Timeline



Apr 7, 2020:

11:19 PM Changeset in webkit [259705] by Carlos Garcia Campos
  • 5 edits in trunk

[GTK][WPE] WTR: fix handling of WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=210106

Reviewed by Adrian Perez de Castro.

Source/WebKit:

Add WKContextSetPrimaryWebsiteDataStore() to expose WebProcessPool::setPrimaryDataStore().

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetPrimaryWebsiteDataStore):

  • UIProcess/API/C/WKContextPrivate.h:

Tools:

The TestController::defaultWebsiteDataStore() is created and used but never really assigned to the
context. Since we are not assigning a WebsiteDataStore to the context, and we don't use the default
WebsiteDataStore, when a new page is created, we end up creating the default one (with the default config,
instead of the one created by WTR).

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::platformAdjustContext): Set defaultWebsiteDataStore() as the primary data store of the
context like the GLib API does.

10:46 PM Changeset in webkit [259704] by Fujii Hironori
  • 3 edits in trunk/Tools

[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=210067

Reviewed by Darin Adler.

There are test cases for overflow, non-overflow, underflow and
non-underflow edge cases in WTF.clampToIntegerFloat test.
maxPlusOne<int> can be used for overflow edge case, INT_MIN for
non-underflow. This change added code to calculate values for
non-overflow and underflow cases.

  • TestWebKitAPI/Tests/WTF/MathExtras.cpp:

(TestWebKitAPI::TEST(WTF.clampToIntegerFloat)):

  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp:

(TestWebKitAPI::TEST(FloatRect.EnclosingIntRect)): Replaced
shiftMaxXEdgeTo(INT_MAX) with shiftMaxXEdgeTo(0) because it also
causes overflow for enclosingIntRect.

9:45 PM Changeset in webkit [259703] by commit-queue@webkit.org
  • 27 edits in trunk

[css-values-4] Support font-relative lh and rlh unit
https://bugs.webkit.org/show_bug.cgi?id=195180

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-04-07
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Pass all 'lh' and 'rlh' tests, minus the '2rlh in font-size on root' test which may be a bug in the test itself: https://github.com/web-platform-tests/wpt/issues/22055

  • web-platform-tests/css/css-values/lh-rlh-on-root-001-expected.txt:

Source/WebCore:

Implement support for 'lh' and 'rlh' units.
https://www.w3.org/TR/css-values-4/#font-relative-lengths

  • css/CSSCalculationValue.cpp:

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):

  • css/CSSGradientValue.cpp:

(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
(WebCore::CSSConicGradientValue::createGradient):

  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):
(WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):
(WebCore::CSSPrimitiveValue::collectDirectRootComputationalDependencies const):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):

  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::viewportWidthFactor const):
(WebCore::CSSToLengthConversionData::viewportHeightFactor const):
(WebCore::CSSToLengthConversionData::viewportMinFactor const):
(WebCore::CSSToLengthConversionData::viewportMaxFactor const):

  • css/CSSToLengthConversionData.h: Replace bool 'm_computingFontSize' with Optional<CSSPropertyID> that indicates the property being computed, where none means the property being computed is unknown or unimportant to know.

(WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add 'parentStyle' parameter, necessary for calculating lh/rlh unit values.
(WebCore::CSSToLengthConversionData::parentStyle const):
(WebCore::CSSToLengthConversionData::computingFontSize const):
(WebCore::CSSToLengthConversionData::computingLineHeight const):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoom const):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoomAndPropertyToCompute const):

  • css/CSSUnits.cpp:

(WebCore::operator<<):

  • css/CSSUnits.h:
  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::evaluate const):

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLength):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::computeLength):
(WebCore::SizesAttributeParser::effectiveSizeDefaultValue):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerElement::resolveCustomStyle):

  • rendering/RenderElement.h:

(WebCore::RenderElement::parentStyle const):

  • rendering/RenderThemeIOS.mm:

(WebCore::applyCommonButtonPaddingToStyle):
(WebCore::RenderThemeIOS::adjustButtonStyle const):

  • rendering/style/RenderStyle.cpp: Extract 'computedLineHeight' behavior into separate 'computeLineHeight' function so logic can be reused elsewhere.

(WebCore::RenderStyle::computedLineHeight const):
(WebCore::RenderStyle::computeLineHeight const):

  • rendering/style/RenderStyle.h:
  • style/StyleBuilderConverter.h: Extract zoom calculation logic out of 'csstoLengthConversionDataWithTextZoomFactor' into separate 'zoomWithTextZoomFactor' function so logic can be reused elsewhere.

(WebCore::Style::zoomWithTextZoomFactor):
(WebCore::Style::BuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::Style::BuilderConverter::convertLineHeight):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueFontSize):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::BuilderState):

LayoutTests:

Implement support for the font-relative 'lh' and 'rlh' units.
https://www.w3.org/TR/css-values-4/#font-relative-lengths

8:59 PM Changeset in webkit [259702] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] webrtc/h265.html is consistently timing out
https://bugs.webkit.org/show_bug.cgi?id=210173

Unreviewed test gardening.

  • platform/ios/TestExpectations: Skip the test on iOS.
8:36 PM Changeset in webkit [259701] by Alan Bujtas
  • 3 edits
    2 adds in trunk

fastclick.com: A Gradient banner is missing
https://bugs.webkit.org/show_bug.cgi?id=210169
<rdar://problem/60680979>

Reviewed by Simon Fraser.

Source/WebCore:

This patch ensures that if the non-fixed specified size for the background content computes to be a close-to-zero value, we produce at least one device pixel size content.
(and this is similar to what we do for FillSizeType::Contain/Cover.)

Test: fast/backgrounds/generated-bck-image-with-small-relative-size.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::calculateFillTileSize const):

LayoutTests:

  • fast/backgrounds/generated-bck-image-with-small-relative-size-expected.html: Added.
  • fast/backgrounds/generated-bck-image-with-small-relative-size.html: Added.
7:38 PM Changeset in webkit [259700] by pvollan@apple.com
  • 10 edits in trunk

[iOS] Deny mach lookup access to the runningboard service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209933

Reviewed by Chris Dumez.

Source/WebKit:

Creating the dependency process assertion in the WebContent process requires access to runningboard, but since
this is only done on process startup, we can issue a temporary extension to the runningboard service, which
will be immediately revoked after the process assertion has been created.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/WebProcessCreationParameters.cpp:

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

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeConnection):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
6:38 PM Changeset in webkit [259699] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Add unit tests for layout tests factories
https://bugs.webkit.org/show_bug.cgi?id=210150

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/factories_unittest.py:

(TestLayoutTestsFactory):
(TestLayoutTestsFactory.test_macos_wk1_release_factory): Added unit-test.
(TestLayoutTestsFactory.test_macos_wk1_debug_factory): Ditto.
(TestLayoutTestsFactory.test_macos_wk2_factory): Ditto.
(TestLayoutTestsFactory.test_ios_wk2_factory): Ditto.
(TestGTKFactory): Renamed.

5:59 PM Changeset in webkit [259698] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. remove the build warning below since r243033.
warning: unused parameter ‘pageMuted’ [-Wunused-parameter]

No new tests, no new behaviors.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setInterrupted):

5:43 PM Changeset in webkit [259697] by Russell Epstein
  • 8 edits in branches/safari-610.1.9-branch

Cherry-pick r259655. rdar://problem/61360282

Return app-bound sessions for instances where WKAppBoundDomains is
empty
https://bugs.webkit.org/show_bug.cgi?id=210124
<rdar://problem/61276630>

Reviewed by Brent Fulgham.

Source/WebKit:

No new tests. Behavior confirmed by existing In-App Browser Privacy
tests.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::sessionWrapperForTask): Remove the flag checking if In-App Browser Privacy is enabled. We should return an app-bound session if WKAppBoundDomains is empty so we no longer need to check the flag here.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain): (WebKit::WebPageProxy::decidePolicyForNavigationAction):
  • UIProcess/WebPageProxy.h: As described above, we no longer need to check the flag in this instance as we are determining behavior based on the WKAppBoundDomains list. Also moved the logic for checking an empty list to setIsNavigatingToAppBoundDomain, so it should take an Optional (WTF::nullopt indicates an empty list).
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::initializeAppBoundDomains): Use the flag to enable internal debugging for testing purposes.
  • UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::filterAppBoundCookies): Flag no longer needed. This should be gated by whether the domains list is empty or not.

Tools:

Cleaned up tests to turn the flag on at the start of each In-App
Browser Privacy test.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (cleanUpInAppBrowserPrivacyTestSettings): (initializeInAppBrowserPrivacyTestSettings): (TEST):

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

5:43 PM Changeset in webkit [259696] by Russell Epstein
  • 4 edits in branches/safari-610.1.9-branch

Cherry-pick r259650. rdar://problem/61419505

WKUserScripts deferred from injection are not injected if -[WKWebView _notifyUserScripts] is called early.
https://bugs.webkit.org/show_bug.cgi?id=210131
rdar://problem/61368446

Reviewed by Brady Eidson.

Source/WebCore:

If Page::notifyToInjectUserScripts() is called early, before Frame::injectUserScripts() happens,
m_hasBeenNotifiedToInjectUserScripts will be false, allowing scripts to build up in m_userScriptsAwaitingNotification
and never being injected (since Page::notifyToInjectUserScripts() will not be called again).

  • page/Page.cpp: (WebCore::Page::notifyToInjectUserScripts): Set m_hasBeenNotifiedToInjectUserScripts to true when called.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST):

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

5:43 PM Changeset in webkit [259695] by Russell Epstein
  • 7 edits in branches/safari-610.1.9-branch/Source/WebKit

Cherry-pick r259615. rdar://problem/61360282

Create a way to signal if the WKAppBoundDomains list is empty
https://bugs.webkit.org/show_bug.cgi?id=210074
<rdar://problem/61359228>

Reviewed by Brent Fulgham.

Updates the WebFramePolicyListener to return an Optional<NavigatingToAppBoundDomain>
to signal if the WKAppBoundDomains list is empty. If so, we don't want to update
any app-bound domain parameters in WebPageProxy.

  • UIProcess/WebFramePolicyListenerProxy.cpp: (WebKit::WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult):
  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponseShared):
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::beginAppBoundDomainCheck): Changed the WebFramePolicyListener to take a NavigatingToAppBoundDomain type as opposed to a boolean to allow it to handle the empty value.

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

5:38 PM Changeset in webkit [259694] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews] Improve summary for CheckPatchRelevance build step
https://bugs.webkit.org/show_bug.cgi?id=210146

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckPatchRelevance): Improved success message.
(CheckPatchRelevance.start):
(CheckPatchRelevance.getResultSummary): Improved failure message.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Updated accordingly.
5:34 PM Changeset in webkit [259693] by wilander@apple.com
  • 4 edits in trunk/Source/WebKit

ITP Debug Mode logs should be more generic now that it blocks all third-party cookies by default
https://bugs.webkit.org/show_bug.cgi?id=210133
<rdar://problem/61399686>

Reviewed by Brent Fulgham.

No new tests. Just a change of logging.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

Now logs if either vector has entries and uses more generic language.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

Now logs if either vector has entries and uses more generic language.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):

Removed hard-coded references to third-party cookie blocking and parameterized it instead.

5:32 PM Changeset in webkit [259692] by Alan Coon
  • 5 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259388. rdar://problem/61269730

[iOS] Allow WebKit to use camera in multi-tasking mode
https://bugs.webkit.org/show_bug.cgi?id=209904

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/mediastream/mac/AVVideoCaptureSource.mm: (WebCore::AVVideoCaptureSource::setupSession):

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:

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

5:32 PM Changeset in webkit [259691] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259363. rdar://problem/61269736

CRASH in MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(), uncaught ObjC exception
https://bugs.webkit.org/show_bug.cgi?id=209827
<rdar://problem/61113080>

Reviewed by Eric Carlson.

-[AVSampleBufferAudioRenderer init] can, in exceptional conditions, return nil. Passing a
nil object, or another object that AVSampleBufferRenderSynchronizer considers "invalid", into
-[AVSampleBufferRenderSynchronizer addRenderer:] will throw an exception. Protect against this
scenario in two ways:

  • Check the return value of -[AVSampleBufferAudioRenderer init], and if nil, log an error, log to console, and set the network state to "DecodeError".
  • Wrap calls to -addRenderer: in @try/@catch blocks, which if caught, log an error, assert, and set the network state to "DecodeError".
  • Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::failedToCreateRenderer):
  • Modules/mediasource/MediaSource.h:
  • platform/graphics/MediaSourcePrivateClient.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::failedToCreateAudioRenderer): (WebCore::MediaSourcePrivateAVFObjC::failedToCreateVideoRenderer):
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):

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

5:32 PM Changeset in webkit [259690] by Alan Coon
  • 6 edits in branches/safari-609-branch/Source

Cherry-pick r259338. rdar://problem/61269727

Support resolution of IPv6 STUN/TURN addresses
https://bugs.webkit.org/show_bug.cgi?id=209808

Reviewed by Eric Carlson.

Source/WebCore:

Add family access to IPAddress to support both IPv4 and IPv6.
Store IPAddress internal value as IPv6 and cast them to IPv4 on demand.

  • platform/network/DNS.h:
  • platform/network/soup/DNSResolveQueueSoup.cpp: (WebCore::resolvedWithObserverCallback):

Source/WebKit:

Update code to support IPv6 addresses when doing DNS resolution of TURN/STUN servers.
Refactor code to share more code between Cocoa ports and non Cocoa ports.
Manually tested with external IPv6 TURN servers.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::createResolver):
  • NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp: (WebKit::resolvedName):

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

5:32 PM Changeset in webkit [259689] by Alan Coon
  • 11 edits in branches/safari-609-branch/Source

Cherry-pick r259316. rdar://problem/61269751

IndexedDB: destroy WebIDBServer when session is removed in network process
https://bugs.webkit.org/show_bug.cgi?id=209606
<rdar://problem/59310081>

Reviewed by Geoffrey Garen.

Source/WebCore:

Rename immediateCloseForUserDelete to immediateClose as we now use it in destructor of IDBServer to make sure
everything in database finishes correctly.

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::~IDBServer): (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince): (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::immediateClose): (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Deleted.
  • Modules/indexeddb/server/UniqueIDBDatabase.h:

Source/WebKit:

Tested manually to verify WebIDBServer is removed and its thread ends when session is removed.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::WebIDBServer::~WebIDBServer): (WebKit::WebIDBServer::addConnection): (WebKit::WebIDBServer::removeConnection): (WebKit::WebIDBServer::close):
  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::destroySession): (WebKit::NetworkProcess::connectionToWebProcessClosed):

Source/WTF:

Add function to kill CrossThreadTaskHandler and make thread finish. Also add a callback to be called before
thread finishes.

  • wtf/CrossThreadTaskHandler.cpp: (WTF::CrossThreadTaskHandler::CrossThreadTaskHandler): (WTF::CrossThreadTaskHandler::setCompletionCallback): (WTF::CrossThreadTaskHandler::kill):
  • wtf/CrossThreadTaskHandler.h:

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

5:32 PM Changeset in webkit [259688] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebKit

Move the misplaced statement to the proper place where in
RESOURCE_LOAD_STATISTICS macro.

This patch removes the build warning below since r259275.
warning: unused variable ‘sameSiteStrictEnforcementEnabled’ [-Wunused-variable]

No new tests, no new behavior changes.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

4:43 PM Changeset in webkit [259687] by Chris Fleizach
  • 41 edits
    2 adds in trunk

AX: VoiceOver can't activate combobox when textfield is inside it
https://bugs.webkit.org/show_bug.cgi?id=210081

Reviewed by Joanmarie Diggs.

Source/WebCore:

Change accessKeyAction to return whether a simulated click event was dispatched.
Accessibility uses that information to decide whether it should sent an event afterwards, because
some objects accessKeyAction is only to focus(). AX is expected here to press on the object (and possibly focus).

Test: accessibility/activation-of-input-field-inside-other-element.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press):

  • dom/Element.h:

(WebCore::Element::accessKeyAction):

  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::accessKeyAction):

  • html/BaseCheckableInputType.h:
  • html/BaseChooserOnlyDateAndTimeInputType.cpp:

(WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction):

  • html/BaseChooserOnlyDateAndTimeInputType.h:
  • html/BaseClickableWithKeyInputType.cpp:

(WebCore::BaseClickableWithKeyInputType::accessKeyAction):

  • html/BaseClickableWithKeyInputType.h:
  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::accessKeyAction):

  • html/HTMLAnchorElement.h:
  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::accessKeyAction):

  • html/HTMLButtonElement.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::accessKeyAction):

  • html/HTMLElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::accessKeyAction):

  • html/HTMLInputElement.h:
  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::accessKeyAction):

  • html/HTMLLabelElement.h:
  • html/HTMLLegendElement.cpp:

(WebCore::HTMLLegendElement::accessKeyAction):

  • html/HTMLLegendElement.h:
  • html/HTMLOptGroupElement.cpp:

(WebCore::HTMLOptGroupElement::accessKeyAction):

  • html/HTMLOptGroupElement.h:
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::accessKeyAction):

  • html/HTMLOptionElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::accessKeyAction):

  • html/HTMLSelectElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::accessKeyAction):

  • html/HTMLTextAreaElement.h:
  • html/HiddenInputType.cpp:

(WebCore::HiddenInputType::accessKeyAction):

  • html/HiddenInputType.h:
  • html/InputType.cpp:

(WebCore::InputType::accessKeyAction):

  • html/InputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::accessKeyAction):

  • html/RangeInputType.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::accessKeyAction):

  • svg/SVGElement.h:

LayoutTests:

  • accessibility/activation-of-input-field-inside-other-element-expected.txt: Added.
  • accessibility/activation-of-input-field-inside-other-element.html: Added.
4:42 PM Changeset in webkit [259686] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iOS ] http/tests/security/appcache-in-private-browsing.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=206750

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:36 PM Changeset in webkit [259685] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r257222. rdar://problem/61414891

Protect WebProcessPool from null weak pointers in m_serviceWorkerProcesses map
https://bugs.webkit.org/show_bug.cgi?id=208143
rdar://problem/58285589

Reviewed by Alex Christensen.

  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::createWebPage): (WebKit::WebProcessPool::updateServiceWorkerUserAgent): (WebKit::WebProcessPool::updateProcessAssertions): When iterating through the map, make sure it does not have a null entry.

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

4:25 PM Changeset in webkit [259684] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Catalina wk2 ] webrtc/peer-connection-audio-mute2.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=210165

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:24 PM Changeset in webkit [259683] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Collect-continuously thread should take m_collectContinuouslyLock while it is waking up concurrent collector thread
https://bugs.webkit.org/show_bug.cgi?id=210163

Reviewed by Saam Barati.

JSTests:

  • stress/collect-continuously-should-not-wake-concurrent-collector-after-prevent-collection-is-called.js: Added.

(let.theCode):

Source/JavaScriptCore:

Collect-Continuously thread has fancy race issue.

In Heap::preventCollection, we first take m_collectContinuouslyLock to ensure collect-continuously thread is not working, and then
we ensure collector thread is stopped by using waitForCollector. However our collect-continuously thread is implemented like this.

while (!m_shouldStopCollectingContinuously) {

{ (A)

LockHolder locker(*m_threadLock);
if (m_requests.isEmpty()) {

m_requests.append(WTF::nullopt);
m_lastGrantedTicket++;
m_threadCondition->notifyOne(locker); (B) WAKING UP concurrent collector thread.

}

}

{

LockHolder locker(m_collectContinuouslyLock);
...
while (!hasElapsed(timeToWakeUp) && !m_shouldStopCollectingContinuously)

m_collectContinuouslyCondition.waitUntil(m_collectContinuouslyLock, timeToWakeUp);

}

}

Even if m_collectContinuouslyLock is taken, collect-continuously thread is still able to wake up concurrent collector thread
since (B)'s code is not guarded by m_collectContinuouslyLock. The following sequence can happen,

  1. The main thread calls Heap::preventCollection to ensure all collection is stopped.
  2. The collect-continuously thread is at (A) point.
  3. The main thread takes m_collectContinuouslyLock. This is OK.
  4. The main thread calls waitForCollector to ensure that concurrent collector thread is stopped.
  5. The collect-continuously thread executes (B). It is allowed since this is not guarded by m_collectContinuouslyLock. So, concurrent collector starts working.
  6. While the main thread called Heap::preventCollection, concurrent collector starts collection!

We should guard (A)'s block with m_collectContinuouslyLock too.

  • heap/Heap.cpp:

(JSC::Heap::notifyIsSafeToCollect):

4:12 PM Changeset in webkit [259682] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] http/wpt/cache-storage/cache-put-keys.https.any.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207496

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
4:11 PM Changeset in webkit [259681] by sbarati@apple.com
  • 3 edits
    2 adds in trunk

Delete ICs can't cache dictionaries
https://bugs.webkit.org/show_bug.cgi?id=210147
<rdar://problem/61382405>

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/dont-cache-delete-ic-on-dictionary-2.js: Added.

(assert):
(makeDictionary):
(foo):

  • stress/dont-cache-delete-ic-on-dictionary.js: Added.

(assert):
(foo):

Source/JavaScriptCore:

We were happily caching delete IC cases on a dictionary object.
This is clearly wrong, as we might cache a miss on a dictionary
on a property "P", even though we might add "P" to the structure
without transitioning it.

  • jit/Repatch.cpp:

(JSC::tryCacheDeleteBy):

4:01 PM Changeset in webkit [259680] by jiewen_tan@apple.com
  • 26 edits in trunk

[WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts
https://bugs.webkit.org/show_bug.cgi?id=209923
<rdar://problem/61223713>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by new tests within existing test files.

  • testing/MockWebAuthenticationConfiguration.h:

(WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::decode):

  • testing/MockWebAuthenticationConfiguration.idl:

Adds a new parameter to reflect user cancellations on LocalAuthentication UI.

Source/WebKit:

This patch intents to streamline WebAuthn local authenticator UX a bit more. Here, we should treat user
cancellation of the LocalAuthentication UI as if it were being done on the UI Client's WebAuthn UI.

  • UIProcess/WebAuthentication/Authenticator.h:
  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::cancelRequest):

  • UIProcess/WebAuthentication/AuthenticatorManager.h:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification):
(WebKit::LocalAuthenticator::validateUserVerification const):

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.h:
  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::verifyUser const):

  • UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:

(WebKit::MockLocalConnection::MockLocalConnection):
(WebKit::MockLocalConnection::verifyUser const):
(WebKit::MockLocalConnection::filterResponses const):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Modifies existing tests to accommodate changes in MockWebAuthenticationConfiguration.idl.

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-la.html:
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-duplicate-credential.html:
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-error.html:
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la.html:

LayoutTests:

Adds a new test for the change and modifies existing tests to accommodate changes in MockWebAuthenticationConfiguration.idl.

  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
  • http/wpt/webauthn/public-key-credential-create-success-local.https.html:
  • http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html:
  • http/wpt/webauthn/public-key-credential-get-failure-local.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-local.https.html:
3:50 PM Changeset in webkit [259679] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[ macOS ] Update sandbox rules for storage
https://bugs.webkit.org/show_bug.cgi?id=210120
<rdar://problem/60972224>

Patch by Sihui Liu <sihui_liu@hotmail.com> on 2020-04-07
Reviewed by Geoffrey Garen.

This direcotry is used for cookie storage.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3:41 PM Changeset in webkit [259678] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ macOS debug ] REGRESSION (r259463): http/tests/media/clearkey/collect-webkit-media-session.html is failing
https://bugs.webkit.org/show_bug.cgi?id=209989

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:39 PM Changeset in webkit [259677] by Russell Epstein
  • 1 edit in branches/safari-609-branch/Source/WebCore/html/HTMLMediaElement.cpp

Unreviewed build fix, rdar://problem/61352465

No viable conversion from 'WebCore::HTMLMediaElement' to 'WebCore::HTMLMediaElement *'

3:32 PM Changeset in webkit [259676] by Tadeu Zagallo
  • 97 edits
    2 copies
    2 adds in trunk

Not using strict mode within ClassDeclaration statement
https://bugs.webkit.org/show_bug.cgi?id=205578
<rdar://problem/58194589>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/inline-strict-delete.js: Added.

(assert):
(bar):
(foo):

  • stress/superclass-expression-strictness.js: Added.

(f.try.c):
(f):

Source/JavaScriptCore:

We correctly set strict mode when parsing classes, but we did not set it when emitting bytecode.
However, that means that we can now have a subset of a code block's bytecode that must be run in
strict mode, even when the code block itself is not strict. As it turns out, there are only ten
opcodes that need to be aware of strictness, so an extra mode operand was added to these opcodes.
The mode then needs to be propagated through baseline, DFG and FTL.

  • API/APICallbackFunction.h:

(JSC::APICallbackFunction::call):

  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::call):

  • API/JSContextRef.cpp:

(JSContextGetGlobalObject):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/BytecodeDumper.cpp:
  • bytecode/BytecodeGeneratorification.cpp:

(JSC::BytecodeGeneratorification::run):

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

(JSC::CodeBlock::dumpAssumingJITType const):
(JSC::CodeBlock::finishCreation):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::isConstructor const):
(JSC::CodeBlock::isKnownCell):

  • bytecode/ExecutableInfo.h:

(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::usesEval const):

  • bytecode/Fits.h:
  • bytecode/InlineCallFrame.cpp:

(JSC::InlineCallFrame::dumpInContext const):

  • bytecode/InlineCallFrame.h:

(JSC::InlineCallFrame::isInStrictContext const):

  • bytecode/PutByIdFlags.cpp:

(WTF::printInternal):

  • bytecode/PutByIdFlags.h:

(JSC::PutByIdFlags::create):
(JSC::PutByIdFlags::createDirect):
(JSC::PutByIdFlags::isDirect const):
(JSC::PutByIdFlags::ecmaMode const):
(JSC::PutByIdFlags::PutByIdFlags):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::isConstructor const):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::needsClassFieldInitializer const):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::generateUnlinkedFunctionCodeBlock):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitGetFromScope):
(JSC::BytecodeGenerator::emitPutToScope):
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
(JSC::BytecodeGenerator::emitDeleteById):
(JSC::BytecodeGenerator::emitPutByVal):
(JSC::BytecodeGenerator::emitDirectPutByVal):
(JSC::BytecodeGenerator::emitDeleteByVal):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
(JSC::BytecodeGenerator::emitToThis):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::ecmaMode const):
(JSC::StrictModeScope::StrictModeScope):

  • bytecompiler/NodesCodegen.cpp:

(JSC::AssignResolveNode::emitBytecode):
(JSC::EmptyLetExpression::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):
(JSC::BindingNode::bindValue const):
(JSC::AssignmentElementNode::bindValue const):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::thisValue const):
(JSC::DebuggerCallFrame::evaluateWithScopeExtension):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleDOMJITCall):
(JSC::DFG::ByteCodeParser::handleDeleteById):
(JSC::DFG::ByteCodeParser::emitPutById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
(JSC::DFG::ByteCodeParser::handlePutByVal):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupToThis):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::globalThisObjectFor):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasECMAMode):
(JSC::DFG::Node::ecmaMode):

  • dfg/DFGOpInfo.h:

(JSC::DFG::OpInfo::OpInfo):

  • dfg/DFGOperations.cpp:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForCellWithString):
(JSC::DFG::SpeculativeJIT::compilePutByValForCellWithSymbol):
(JSC::DFG::SpeculativeJIT::compilePutDynamicVar):
(JSC::DFG::SpeculativeJIT::compilePutByIdFlush):
(JSC::DFG::SpeculativeJIT::compilePutById):
(JSC::DFG::SpeculativeJIT::compilePutByIdDirect):
(JSC::DFG::SpeculativeJIT::compilePutByIdWithThis):
(JSC::DFG::SpeculativeJIT::compileToThis):
(JSC::DFG::SpeculativeJIT::cachedPutById):

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

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileDeleteById):
(JSC::DFG::SpeculativeJIT::compileDeleteByVal):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileToThis):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByValWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compilePutById):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileDeleteById):
(JSC::FTL::DFG::LowerDFGToB3::compileDeleteByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compilePutDynamicVar):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::internalConstructorName):

  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::Interpreter::execute):

  • interpreter/Interpreter.h:
  • jit/AssemblyHelpers.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileCallEval):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITPutByIdGenerator::slowPathFunction):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITPutByIdGenerator::JITPutByIdGenerator):

  • jit/JITInlines.h:

(JSC::JIT::linkSlowCaseIfNotJSCell):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::emit_op_put_by_id):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_put_by_val):

  • jit/Repatch.cpp:

(JSC::tryCacheDeleteBy):
(JSC::repatchDeleteBy):

  • jit/Repatch.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::commonCallEval):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):

  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlock::usesEval const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::materializeSpecials):

  • runtime/CodeCache.cpp:

(JSC::generateUnlinkedCodeBlockImpl):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPathsInlines.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/Completion.cpp:

(JSC::evaluate):

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

  • runtime/DirectEvalExecutable.h:
  • runtime/ECMAMode.cpp: Copied from Source/JavaScriptCore/bytecode/PutByIdFlags.cpp.

(JSC::ECMAMode::dump const):

  • runtime/ECMAMode.h: Copied from Source/JavaScriptCore/bytecode/PutByIdFlags.h.

(JSC::ECMAMode::fromByte):
(JSC::ECMAMode::strict):
(JSC::ECMAMode::sloppy):
(JSC::ECMAMode::isStrict const):
(JSC::ECMAMode::value const):
(JSC::ECMAMode::ECMAMode):

  • runtime/EvalExecutable.h:

(JSC::EvalExecutable::executableInfo const):

  • runtime/FunctionExecutable.h:
  • runtime/GetPutInfo.cpp:

(JSC::GetPutInfo::dump const):

  • runtime/GetPutInfo.h:

(JSC::GetPutInfo::GetPutInfo):
(JSC::GetPutInfo::ecmaMode const):

  • runtime/GetterSetter.cpp:

(JSC::callSetter):

  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::create):
(JSC::IndirectEvalExecutable::IndirectEvalExecutable):

  • runtime/IndirectEvalExecutable.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::toThisSlowCase const):
(JSC::JSValue::putToPrimitive):

  • runtime/JSCJSValue.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::toThis):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::selectStructureForNewFuncExp):
(JSC::JSFunction::callerGetter):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):

  • runtime/JSScope.cpp:

(JSC::JSScope::toThis):

  • runtime/JSString.cpp:

(JSC::JSString::toThis):

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::parse):

  • runtime/ModuleProgramExecutable.h:
  • runtime/NullSetterFunction.cpp:

(JSC::GetCallerStrictnessFunctor::operator() const):
(JSC::NullSetterFunctionInternal::callReturnUndefined):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/ProgramExecutable.h:
  • runtime/ProxyObject.cpp:

(JSC::performProxyCall):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::isArrowFunctionContext const):
(JSC::ScriptExecutable::isInStrictContext const):

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayEntry::put):

Source/WebCore:

Test: JSTests/ stress/superclass-expression-strictness.js

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::IDLOperation<JSDOMWindow>::cast):

  • bindings/js/JSEventTargetCustom.h:

(WebCore::IDLOperation<JSEventTarget>::call):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

LayoutTests:

Fix the test since it contained incorrect code.

  • js/class-syntax-method-names-expected.txt:
  • js/script-tests/class-syntax-method-names.js:
3:27 PM Changeset in webkit [259675] by Ryan Haddad
  • 8 edits in trunk

Unreviewed, reverting r259655.

Caused assertion failures and timeouts on iOS bots

Reverted changeset:

"Return app-bound sessions for instances where
WKAppBoundDomains is"
https://bugs.webkit.org/show_bug.cgi?id=210124
https://trac.webkit.org/changeset/259655

3:09 PM Changeset in webkit [259674] by Chris Dumez
  • 11 edits
    3 deletes in trunk/Source

Merge DependencyAssertion into ProcessAssertion
https://bugs.webkit.org/show_bug.cgi?id=210076

Reviewed by Alex Christensen.

Source/WebKit:

Merge DependencyAssertion into ProcessAssertion. After r259610, ProcessAssertion can use
RunningBoard assertions so there is no longer any need to a separate DependencyAssertion
class. We can simply introduce a new assertion type to ProcessAssertion.

  • Shared/DependencyProcessAssertion.cpp: Removed.
  • Shared/DependencyProcessAssertion.h: Removed.
  • Shared/ios/DependencyProcessAssertionIOS.mm: Removed.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _hasBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):
(WebKit::runningBoardNameForAssertionType):

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

(WebKit::WebProcess::initializeConnection):

  • WebProcess/WebProcess.h:

Source/WTF:

  • wtf/PlatformHave.h:
3:07 PM Changeset in webkit [259673] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebKit

Simplify and fortify network getNetworkProcessConnection and getGPUProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=210142
<rdar://problem/59488963>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-07
Reviewed by Youenn Fablet.

We have reports of hangs inside WebKit::getNetworkProcessConnection that seem to last forever.
Some of the reports indicate the network process is being suspended while a connection is being established with it.

To fix this issue we do three things:

  1. We take a foregroundActivity when sending an async message to establish a connection.
  2. We use sendWithAsyncReply which already has logic to handle the case where we are currently launching the process. Instead of the complicated retry logic, we add a retry attempt in WebProcessPool if the connection identifier is invalid.
  3. Add some release logging so we can better diagnose problems with this flow in the future.

The functional change is adding the foreground activity, which should prevent some hangs.
The rest is just to make this code more sane to understand and debug.
I do the same changes to NetworkProcess and GPUProcess because they are intended to be the same. The latter is based on the former.

The API test WebKit.NetworkProcessCrashWithPendingConnection covers what happens when the network process crashes during connection establishment.
It fails if we don't retry somewhere, which I did in WebProcessPool. We also need to try again in getNetworkProcessConnection and getGPUProcessConnection.
If it fails twice, there's nothing we can do, and we crash the web process to avoid a crash loop.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::~GPUProcessProxy): Deleted.
(WebKit::GPUProcessProxy::openGPUProcessConnection): Deleted.

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
(WebKit::NetworkProcessProxy::networkProcessCrashed):
(WebKit::NetworkProcessProxy::didFinishLaunching):
(WebKit::NetworkProcessProxy::openNetworkProcessConnection): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::networkProcessCrashed):
(WebKit::WebProcessPool::getNetworkProcessConnection):
(WebKit::WebProcessPool::getGPUProcessConnection):

  • UIProcess/WebProcessPool.h:
  • WebProcess/GPU/GPUProcessConnectionInfo.h:

(WebKit::GPUProcessConnectionInfo::identifier const):
(WebKit::GPUProcessConnectionInfo::identifier): Deleted.

  • WebProcess/Network/NetworkProcessConnectionInfo.h:

(WebKit::NetworkProcessConnectionInfo::identifier const):
(WebKit::NetworkProcessConnectionInfo::identifier): Deleted.

2:33 PM Changeset in webkit [259672] by Simon Fraser
  • 8 edits in trunk/Source

Use RectEdges<> in some scrolling tree code
https://bugs.webkit.org/show_bug.cgi?id=210141

Reviewed by Tim Horton.
Source/WebCore:

Add utility functions on ScrollingTreeScrollingNode to get pinned and rubberband state.
Use them to push main frame state to the scrolling tree (which we do so we can safely
access the state from the EventDispatcher thread).

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::setMainFramePinnedState):
(WebCore::ScrollingTree::setMainFrameCanRubberBand):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
(WebCore::ScrollingTree::setMainFramePinState): Deleted.
(WebCore::ScrollingTree::setCanRubberBandState): Deleted.

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::edgePinnedState const):
(WebCore::ScrollingTreeScrollingNode::isRubberBanding const):

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

(WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinAndRubberbandState):

Source/WebKit:

Construct a RectEdges<>. Order is top, right, bottom, left.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

2:14 PM Changeset in webkit [259671] by jdiggs@igalia.com
  • 9 edits in trunk

AX: Change ATK mapping of the ARIA alert and alertdialog roles
https://bugs.webkit.org/show_bug.cgi?id=210121

Reviewed by Chris Fleizach.

Source/WebCore:

The ARIA alert role is a live region; not a dialog/message box. In contrast,
the ATK alert role is for dialogs such as a warning message which should be
presented immediately to the user. Because of the similarity in role names,
the original mappings in the Core-AAM were not ideal. They have recently
been fixed so we need to update our implementation accordingly.

Changed mappings

  • alertdialog from ATK_ROLE_DIALOG to ATK_ROLE_ALERT
  • alert from ATK_ROLE_ALERT to ATK_ROLE_NOTIFICATION

Updated existing tests to reflect this change.

  • accessibility/atk/WebKitAccessible.cpp:

(atkRole):

Tools:

Add support for ATK_ROLE_NOTIFICATION.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

  • accessibility/aria-mappings-expected.txt: Updated.
  • accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
2:09 PM Changeset in webkit [259670] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

[GLIB] Avoid potential segfault in getPlatformEditorState
https://bugs.webkit.org/show_bug.cgi?id=210149

Reviewed by Carlos Alberto Lopez Perez.

Avoid potential surroundingRange dereference segfault.

  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::getPlatformEditorState const):

2:00 PM Changeset in webkit [259669] by wenson_hsieh@apple.com
  • 12 edits
    2 adds in trunk

Preventing touch events should not prevent gestures installed above WKWebView from recognizing
https://bugs.webkit.org/show_bug.cgi?id=210080
<rdar://problem/61365814>

Reviewed by Tim Horton.

Source/WebKit:

Makes a small adjustment to native gesture deferral logic, so that gestures installed above WKWebView (in the
view hierarchy) are not prevented from recognizing by WKDeferringGestureRecognizer. This makes it possible for
WebKit clients to install custom gestures outside of WKWebView that cannot be prevented by web content, without
having to create a separate window and pass touches through to the WKWebView.

Test: fast/events/touch/ios/prevent-default-with-window-tap-gesture.html

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Tools:

Add a UIScriptController helper method that allows a test to install a tap gesture recognizer on the UIWindow
containing the web view. This method additionally takes a JavaScript callback, which is invoked when the tap
gesture is recognized.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptContext.h:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::installTapGestureOnWindow):

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView resetInteractionCallbacks]):
(-[TestRunnerWKWebView didRecognizeTapOnWindow]):
(-[TestRunnerWKWebView windowTapRecognizedCallback]):
(-[TestRunnerWKWebView setWindowTapRecognizedCallback:]):
(-[TestRunnerWKWebView willMoveToWindow:]):
(-[TestRunnerWKWebView didMoveToWindow]):
(-[TestRunnerWKWebView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::installTapGestureOnWindow):

LayoutTests:

Add a new layout test to verify that calling preventDefault() on touchstart doesn't prevent gesture recognizers
installed above the WKWebView from recognizing. To do this, we use the new UIScriptController method to add a
gesture recognizer to the window containing the web view, and then simulate a tap over an element that prevents
the touchstart event.

  • fast/events/touch/ios/prevent-default-with-window-tap-gesture-expected.txt: Added.
  • fast/events/touch/ios/prevent-default-with-window-tap-gesture.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.async activateElementAfterInstallingTapGestureOnWindow.return.new.Promise.):
(window.UIHelper.async activateElementAfterInstallingTapGestureOnWindow.return.new.Promise):
(window.UIHelper.async activateElementAfterInstallingTapGestureOnWindow):
(window.UIHelper):

1:49 PM Changeset in webkit [259668] by Alexey Shvayka
  • 4 edits in trunk

test262/Runner.pm ignores "async" flag
https://bugs.webkit.org/show_bug.cgi?id=210127

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml: Mark 56 test cases as failing.

Tools:

This change adds dereferencing for $data->{flags} array, making grep work as
expected. Other flags are correctly handled by getScenarios function, which
gets a dereferenced array as an argument.

  • Scripts/test262/Runner.pm:

(runTest):

1:23 PM Changeset in webkit [259667] by Truitt Savell
  • 3 edits in trunk/Tools

Unreviewed, reverting r259446.

Broke Windows testing

Reverted changeset:

"[Windows] Ignore render tree dump based results on Windows"
https://bugs.webkit.org/show_bug.cgi?id=209897
https://trac.webkit.org/changeset/259446

1:17 PM Changeset in webkit [259666] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: focus outline of scope bar is clipped
https://bugs.webkit.org/show_bug.cgi?id=209877
<rdar://problem/61173598>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ScopeBar.css:

(.scope-bar):

1:07 PM Changeset in webkit [259665] by Brian Burg
  • 2 edits in trunk/Source/WebKit

Web Automation: Automation.inspectBrowsingContext should bring Web Inspector to front automatically
https://bugs.webkit.org/show_bug.cgi?id=210137

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::inspectBrowsingContext):
Previously, calling connect() would preload Web Inspector but not show its window. This
made it awkward to use the 'safari:automaticInspection' capability without subsequently
evaluating a debugger; statement to bring Web Inspector to front.

1:03 PM Changeset in webkit [259664] by Alan Coon
  • 6 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Apply patch. rdar://problem/61231957

1:03 PM Changeset in webkit [259663] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Apply patch. rdar://problem/61231889

1:03 PM Changeset in webkit [259662] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Apply patch. rdar://problem/61231881

1:03 PM Changeset in webkit [259661] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Apply patch. rdar://problem/61404555

12:59 PM Changeset in webkit [259660] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Add unit-test for CheckPatchRelevance build step
https://bugs.webkit.org/show_bug.cgi?id=210140

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.

(TestCheckPatchRelevance):
(TestCheckPatchRelevance.test_relevant_patch):
(TestCheckPatchRelevance.test_non_relevant_patch):

12:43 PM Changeset in webkit [259659] by Antti Koivisto
  • 8 edits in trunk/Source/WebCore

Make StylePropertyShorthand iterable
https://bugs.webkit.org/show_bug.cgi?id=210117

Reviewed by Darin Adler.

Enable modern for-loops.

  • animation/AnimationTimeline.cpp:

(WebCore::transitionMatchesProperty):
(WebCore::compileTransitionPropertiesInStyle):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::updateStyleIfNeededForProperty):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::propertyIsImportant const):
(WebCore::MutableStyleProperties::setProperty):

  • css/StylePropertyShorthand.h:

(WebCore::StylePropertyShorthand::begin const):
(WebCore::StylePropertyShorthand::end const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::addExpandedPropertyForValue):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

12:35 PM Changeset in webkit [259658] by Ross Kirsling
  • 10 edits in trunk/JSTests

Update JSTests to assume ICU 60+
https://bugs.webkit.org/show_bug.cgi?id=210085

Reviewed by Yusuke Suzuki.

  • stress/intl-collator.js:
  • stress/intl-constructors-with-proxy.js:
  • stress/intl-datetimeformat.js:
  • stress/intl-default-locale.js:
  • stress/intl-numberformat-format-to-parts.js:
  • stress/intl-numberformat.js: Ensure a test case doesn't depend on behavior changed in ICU 64.
  • stress/intl-object.js:
  • stress/intl-pluralrules.js: Correct two invalid test cases.
  • test262/config.yaml:

Remove skips.

11:58 AM Changeset in webkit [259657] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Fix my conflict Markers
https://trac.webkit.org/changeset/259656/webkit

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:53 AM Changeset in webkit [259656] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: (r258434) [ Mac WK1 ] media/track/track-css-user-override.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210134

unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:43 AM Changeset in webkit [259655] by Kate Cheney
  • 8 edits in trunk

Return app-bound sessions for instances where WKAppBoundDomains is
empty
https://bugs.webkit.org/show_bug.cgi?id=210124
<rdar://problem/61276630>

Reviewed by Brent Fulgham.

Source/WebKit:

No new tests. Behavior confirmed by existing In-App Browser Privacy
tests.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
Remove the flag checking if In-App Browser Privacy is enabled. We
should return an app-bound session if WKAppBoundDomains is empty so
we no longer need to check the flag here.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebPageProxy.h:

As described above, we no longer need to check the flag in this
instance as we are determining behavior based on the WKAppBoundDomains
list. Also moved the logic for checking an empty list to setIsNavigatingToAppBoundDomain,
so it should take an Optional (WTF::nullopt indicates an empty list).

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::initializeAppBoundDomains):
Use the flag to enable internal debugging for testing purposes.

  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::filterAppBoundCookies):
Flag no longer needed. This should be gated by whether the domains
list is empty or not.

Tools:

Cleaned up tests to turn the flag on at the start of each In-App
Browser Privacy test.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(cleanUpInAppBrowserPrivacyTestSettings):
(initializeInAppBrowserPrivacyTestSettings):
(TEST):

11:43 AM Changeset in webkit [259654] by Alan Coon
  • 3 edits
    4 adds in branches/safari-609.2.1.2-branch

Cherry-pick r257605. rdar://problem/61231926

Poly proto should work with property delete transitions
https://bugs.webkit.org/show_bug.cgi?id=208261

Reviewed by Saam Barati.

JSTests:

  • stress/delete-property-poly-proto.js: Added. (A.prototype.set x): (A): (B):

Source/JavaScriptCore:

This patch fixes a bug where the combination of inline caching
and poly proto cause us to cache a setter call along a prototype chain that
is no longer the correct setter to call. This is exposed as a result of
https://bugs.webkit.org/show_bug.cgi?id=206430 since DefineOwnProperty used
to transition to uncacheable dictionary.

The case looks like this:
A - setter for x redefines x
|
B
|
C

We set (new C).x

Right now, we first call A's setter, then we try to figure out what the state of things
were before it was called in order to cache it. We just assume that A's setter still exists, and we cache it
without ever checking, In this patch, we ensure that the property exists and the attributes match in order to prevent crashing.

In the code, A = target, C = base.

Get is correct because it collects caching information before any calls.

The bug https://bugs.webkit.org/show_bug.cgi?id=208337 tracks the remaining semantic bugs around this code.

  • jit/Repatch.cpp: (JSC::tryCachePutByID):

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

11:43 AM Changeset in webkit [259653] by Alan Coon
  • 19 edits in branches/safari-609.2.1.2-branch/Source/JavaScriptCore

Cherry-pick r255542. rdar://problem/61231926

[JSC] Hold StructureID instead of Structure* in PolyProtoAccessChain and DFG::CommonData
https://bugs.webkit.org/show_bug.cgi?id=207086

Reviewed by Mark Lam.

PolyProtoAccessChain and DFG::CommonData are kept alive so long as associated AccessCase / DFG/FTL CodeBlock
is alive. They hold Vector<Structure*> / Vector<WriteBarrier<Structure*>>, but access frequency is low. And
We should hold Vector<StructureID> instead to cut 50% of the size.

  • bytecode/AccessCase.cpp: (JSC::AccessCase::commit): (JSC::AccessCase::forEachDependentCell const): (JSC::AccessCase::doesCalls const): (JSC::AccessCase::visitWeak const): (JSC::AccessCase::propagateTransitions const): (JSC::AccessCase::generateWithGuard):
  • bytecode/AccessCase.h:
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::propagateTransitions): (JSC::CodeBlock::determineLiveness): (JSC::CodeBlock::stronglyVisitWeakReferences):
  • bytecode/GetByStatus.cpp: (JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InByIdStatus.cpp: (JSC::InByIdStatus::computeFor): (JSC::InByIdStatus::computeForStubInfo): (JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InByIdStatus.h:
  • bytecode/InstanceOfStatus.cpp: (JSC::InstanceOfStatus::computeFor): (JSC::InstanceOfStatus::computeForStubInfo):
  • bytecode/InstanceOfStatus.h:
  • bytecode/PolyProtoAccessChain.cpp: (JSC::PolyProtoAccessChain::create): (JSC::PolyProtoAccessChain::needImpurePropertyWatchpoint const): (JSC::PolyProtoAccessChain::dump const):
  • bytecode/PolyProtoAccessChain.h: (JSC::PolyProtoAccessChain::chain const): (JSC::PolyProtoAccessChain::forEach const): (JSC::PolyProtoAccessChain::slotBaseStructure const): (JSC::PolyProtoAccessChain:: const): Deleted.
  • bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate):
  • bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeForStubInfo):
  • bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::summary const): (JSC::StructureStubInfo::summary):
  • bytecode/StructureStubInfo.h:
  • dfg/DFGCommonData.h:
  • dfg/DFGDesiredWeakReferences.cpp: (JSC::DFG::DesiredWeakReferences::reallyAdd):
  • dfg/DFGPlan.cpp: (JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
  • jit/Repatch.cpp: (JSC::tryCacheGetBy): (JSC::tryCachePutByID): (JSC::tryCacheInByID):

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

11:41 AM Changeset in webkit [259652] by sbarati@apple.com
  • 12 edits in trunk

RAMification should have a way of gathering vmmaps for each test at the end of each run
https://bugs.webkit.org/show_bug.cgi?id=210060

Reviewed by Yusuke Suzuki.

PerformanceTests:

When I was debugging a memory issue, I needed to gather vmmaps for each
RAMification subtest. This patch is checking in the code I wrote to be able
to do this. It works by:

  • Passing in an argument to RAMification saying we want vmmaps at the end of

each subtest run.

  • RAMification invokes jsc with an environment variable that tells the shell

to wait for one character of input from stdin before exiting.

  • The jsc shell also disables the bmalloc scavenger while waiting for input so the

vmmap we take from the python runner script represents the "footprint" score
of the benchmark. If the scavenger ran, it would end up releasing too much
memory for the vmmap to be useful.

  • The python script runs a vmmap, and then communicates to the jsc process

when the vmmap finishes running.

  • JetStream2/RAMification.py:

(parseArgs):
(BaseRunner.init):
(BaseRunner.getResults):
(LocalRunner.runOneTest):
(main):
(main.runTestList):

Source/bmalloc:

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::partialScavenge):

  • bmalloc/Scavenger.h:

(bmalloc::Scavenger::disable):

  • bmalloc/bmalloc.cpp:

(bmalloc::api::disableScavenger):

  • bmalloc/bmalloc.h:

Source/JavaScriptCore:

  • jsc.cpp:

(main):

Source/WTF:

  • wtf/FastMalloc.cpp:

(WTF::fastDisableScavenger):

  • wtf/FastMalloc.h:
11:40 AM Changeset in webkit [259651] by Chris Dumez
  • 4 edits
    2 adds in trunk

documentFragment.getElementById() should not work for empty-string IDs
https://bugs.webkit.org/show_bug.cgi?id=210111

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Import test coverage from upstream WPT.

  • web-platform-tests/dom/nodes/DocumentFragment-getElementById-expected.txt: Added.
  • web-platform-tests/dom/nodes/DocumentFragment-getElementById.html: Added.

Source/WebCore:

Make sure that getElementById() returns null when given an empty string ID:

Test: imported/w3c/web-platform-tests/dom/nodes/DocumentFragment-getElementById.html

  • dom/DocumentFragment.cpp:

(WebCore::DocumentFragment::getElementById const):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::getElementById const):

11:37 AM Changeset in webkit [259650] by timothy@apple.com
  • 4 edits in trunk

WKUserScripts deferred from injection are not injected if -[WKWebView _notifyUserScripts] is called early.
https://bugs.webkit.org/show_bug.cgi?id=210131
rdar://problem/61368446

Reviewed by Brady Eidson.

Source/WebCore:

If Page::notifyToInjectUserScripts() is called early, before Frame::injectUserScripts() happens,
m_hasBeenNotifiedToInjectUserScripts will be false, allowing scripts to build up in m_userScriptsAwaitingNotification
and never being injected (since Page::notifyToInjectUserScripts() will not be called again).

  • page/Page.cpp:

(WebCore::Page::notifyToInjectUserScripts): Set m_hasBeenNotifiedToInjectUserScripts to true when called.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

11:19 AM Changeset in webkit [259649] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Web Inspector: unable to see cookies on pages that have subframes which have been denied access to cookies
https://bugs.webkit.org/show_bug.cgi?id=210125
<rdar://problem/61357992>

Reviewed by Timothy Hatcher.

Previously, the same boolean value was re-used when checking whether that URL and document
pairs is able to access cookies, meaning that if the last check returned false, the logic
would incorrectly think that none of the URL and document pairs would have access to any
cookies, resulting in an empty array.

Instead of using this all-or-nothing boolean, if a URL and document pair is not able to
access cookies, simply ignore it and move on to the next pair.

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::getCookies):

11:18 AM Changeset in webkit [259648] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add message to message filter in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=210130

Reviewed by Brent Fulgham.

Add a required syscall-mach message to the message filter in the WebContent sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
11:10 AM Changeset in webkit [259647] by rniwa@webkit.org
  • 4 edits in trunk

TextManipulationController fails to replace a paragraph that ends with a br
https://bugs.webkit.org/show_bug.cgi?id=210099

Reviewed by Wenson Hsieh.

Source/WebCore:

The bug was caused by TextManipulationController::replace not ignoring the br at the end of a paragraph
even through it doesn't appear as a token. We also need to insert this br back at the end of the paragraph
when completing the manipulation.

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::replace):

Tools:

Added regression tests.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TextManipulation.CompleteTextManipulationReplaceMultipleSimpleParagraphsSeparatedByBR):
(TextManipulation.CompleteTextManipulationReplaceParagraphsSeparatedByWrappedBR):
(TextManipulation.CompleteTextManipulationFailWhenBRIsInserted):

11:04 AM Changeset in webkit [259646] by ysuzuki@apple.com
  • 8 edits
    1 add in trunk

[JSC] ScopedArgumentsTable should handle OOM in tolerant manner
https://bugs.webkit.org/show_bug.cgi?id=210126

Reviewed by Mark Lam.

JSTests:

  • stress/scoped-arguments-table-should-be-tolerant-for-oom.js: Added.

(canThrow):
(bar):
(get bar):
(foo):
(i.canThrow):

Source/JavaScriptCore:

This patch makes ScopedArgumentsTable allocations OOM tolerant to throw OOM error when allocation fails.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • runtime/CachedTypes.cpp:

(JSC::CachedScopedArgumentsTable::decode const):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::unmapArgument):

  • runtime/ScopedArgumentsTable.cpp:

(JSC::ScopedArgumentsTable::tryClone):
(JSC::ScopedArgumentsTable::trySetLength):
(JSC::ScopedArgumentsTable::trySet):
(JSC::ScopedArgumentsTable::clone): Deleted.
(JSC::ScopedArgumentsTable::setLength): Deleted.
(JSC::ScopedArgumentsTable::set): Deleted.

  • runtime/ScopedArgumentsTable.h:
  • runtime/SymbolTable.h:
10:39 AM Changeset in webkit [259645] by ysuzuki@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

[JSC] JSWrapperObject should use JSInternalFieldObjectImpl
https://bugs.webkit.org/show_bug.cgi?id=210019

Reviewed by Mark Lam.

JSWrapperObject's mechanism can be basically implemented by using JSInternalFieldObjectImpl.
We should leverage JSInternalFieldObjectImpl to implement JSWrapperObject since it can pave
the way to implementing Object-Allocation-Sinking and faster access to value etc. in DFG without
duplicating code.

We also noticed that we are storing classInfo to JSWrapperObject when allocating StringObject in
DFG and FTL while JSWrapperObject is no longer inheriting JSDestructibleObject! But it turned out
that this is safe since the subsequent JSWrapperObject::internalValue setting can overwrite it.
We remove this wrong store.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewStringObject):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject): Deleted.

  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):

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

(JSC::FTL::DFG::LowerDFGToB3::compileNewStringObject):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateDestructibleObject): Deleted.

  • runtime/BigIntObject.h:
  • runtime/BooleanObject.h:
  • runtime/JSDestructibleObject.h:

(JSC::JSDestructibleObject::classInfo const):
(JSC::JSDestructibleObject::classInfoOffset): Deleted.

  • runtime/JSWrapperObject.cpp:

(JSC::JSWrapperObject::visitChildren):

  • runtime/JSWrapperObject.h:

(JSC::JSWrapperObject::internalValueOffset):
(JSC::JSWrapperObject::internalValue const):
(JSC::JSWrapperObject::setInternalValue):
(JSC::JSWrapperObject::createStructure): Deleted.

  • runtime/NumberObject.h:
  • runtime/StringObject.h:
  • runtime/SymbolObject.h:
10:26 AM Changeset in webkit [259644] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Make sure playback of remote audio tracks is stable even if pages are using webaudio
https://bugs.webkit.org/show_bug.cgi?id=210052

Reviewed by Eric Carlson.

If a client requests data from AudioSampleDataSource, and the time requested happens to land
precicely on the end of the AudioSampleDataSoure's CARingBuffer's range, the function will get
into an inconsistent state where it believes both that not enough samples are available to
fulfill the request, but also that the number of frames available is equal to the number of
requested frames. This is due to an off-by-one error, where the end of the CARingBuffer's range
is incorrectly treated as inclusive, rather than exclusive. All subsequent requests will start at
sampleCount + timestamp, as if that data was returned correctly, rather than returning zeros,
propogating the error to future requests.

Fix this state by correctly checking if timestamp is greater-than-or-equal-to endFrame. This will
cause the method to return zero frames, and correctly apply an offset so the next request will start
at the same effective timestamp.

  • platform/audio/mac/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::pullSamplesInternal):

9:38 AM Changeset in webkit [259643] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Log a warning if playbin is not found
https://bugs.webkit.org/show_bug.cgi?id=210112

Reviewed by Philippe Normand.

I spent quite a bit of time looking in the debugger for what ended up
being a trivial configuration issue because there was no logging
showing any obvious problem. Let's add it.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::isAvailable):

9:29 AM Changeset in webkit [259642] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=210118

Unreviewed gardening.

Add more tests failing in EWS gtk-wk2 bot but not in test bot.

  • platform/gtk/TestExpectations:
9:25 AM Changeset in webkit [259641] by Adrian Perez de Castro
  • 11 edits
    1 add
    2 deletes in trunk

[GTK] CMake find module for GTK4
https://bugs.webkit.org/show_bug.cgi?id=210110

Reviewed by Don Olmstead.

.:

Rename FindGTK3.cmake as FindGTK.cmake, make it provide a GTK::GTK imported target,
and rewrite the logic to detect which targets (backends) have been built into GTK
to use the "targets" pkg-config variable instead of checking for multiple pkg-config
modules.

  • Source/cmake/FindGDK3.cmake: Removed.
  • Source/cmake/FindGTK.cmake: Added.
  • Source/cmake/FindGTK3.cmake: Removed. This is now unused because the GTK::GTK target

will transitively depend on GDK3 when using GTK3 and bring in the compiler and linker
options automatically without needing to use a separate find module for GDK.

  • Source/cmake/OptionsGTK.cmake: Use the GTK::GTK imported target, change variables

prefixed with GTK3_ to use the GTK_ prefix, and remove variables which are not needed
anymore when using the target (GTK_LIBRARIES, GTK_INCLUDE_DIRS, GDK_LIBRARIES and
GDK_INCLUDE_DIRS).

Source/WebCore:

No new tests needed.

  • PlatformGTK.cmake: Use the GTK::GTK imported target.

Source/WebCore/PAL:

  • pal/PlatformGTK.cmake: Use the GTK::GTK imported target.

Tools:

  • MiniBrowser/gtk/CMakeLists.txt: Use the GTK::GTK imported target.
  • TestWebKitAPI/PlatformGTK.cmake: Ditto.
  • TestWebKitAPI/glib/PlatformGTK.cmake: Ditto.
  • WebKitTestRunner/PlatformGTK.cmake: Ditto.
9:09 AM Changeset in webkit [259640] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r259383-259384): ASSERTION FAILED: 'Completion handler should always be called' seen with http/wpt/service-workers/service-worker-different-process.https.html
https://bugs.webkit.org/show_bug.cgi?id=209977

Reviewed by Chris Dumez.

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy):
In case AuxiliaryProcessProxy has some enqueued messages but process crashes on launch for instance,
we should call the completion handlers and fail.

9:09 AM Changeset in webkit [259639] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, IndexedDB flaky failures
https://bugs.webkit.org/show_bug.cgi?id=210116

Unreviewed gardening.

  • platform/gtk/TestExpectations:
9:04 AM Changeset in webkit [259638] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] Inlined IC should get right JSGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=210092

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/getter-setter-globalobject-in-ic.js: Added.

(shouldBe):
(valueFunc):
(accessorFunc):
(valueTest):
(accessorTest):

Source/JavaScriptCore:

In DFG / FTL, CodeBlock in AccessCase is the DFG / FTL CodeBlock which includes all the inlined CodeBlocks.
If inlining happens with CodeBlock which has different JSGlobalObject, CodeBlock->globalObject() is different
to the actual lexical JSGlobalObject of the IC. So basically, we should not rely on codeBlock->globalObject() in IC.

This patch passes the correct lexical JSGlobalObject to IC to use. We do not retain this JSGlobalObject.
Since this is lexical JSGlobalObject of that IC, the owner CodeBlock of this IC should already retain it (even if this
JSGlobalObject is one of inlined CodeBlock since the owner CodeBlock retains inlined lower-tier CodeBlocks).

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:
  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::addAccessCase):

  • bytecode/StructureStubInfo.h:
  • jit/Repatch.cpp:

(JSC::tryCacheGetBy):
(JSC::tryCacheArrayGetByVal):
(JSC::tryCachePutByID):
(JSC::tryCacheDeleteBy):
(JSC::tryCacheInByID):
(JSC::tryCacheInstanceOf):

  • tools/JSDollarVM.cpp:
9:00 AM Changeset in webkit [259637] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

VisitedLinkStore.messages.in and VisitedLinkStore::addVisitedLinkHashFromPage() don't agree on type of linkHash
<https://webkit.org/b/210094>
<rdar://problem/60334644>

Reviewed by Chris Dumez.

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Don't forward-declare WebCore::SharedStringHash as a class since it is a uint32_t.
  • UIProcess/VisitedLinkStore.messages.in:
  • Use WebCore::SharedStringHash type for linkHash to fix the type mismatch.
8:48 AM Changeset in webkit [259636] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] $.evalScript should check exception when accessing "global"
https://bugs.webkit.org/show_bug.cgi?id=210114
<rdar://problem/61388482>

Reviewed by Keith Miller.

JSTests:

  • stress/eval-script-global-access-exception-check.js: Added.

(shouldThrow):

Source/JavaScriptCore:

$.evalScript should check exception after "global" property access since it can throw an error if it is an accessor.

  • jsc.cpp:

(functionDollarEvalScript):

8:23 AM Changeset in webkit [259635] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, drop bad assertion introduced in r259610.

On some bots (in particular OpenSource iOS ones), we are unable to take the assertion
so this assertion does not hold true.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):

7:16 AM Changeset in webkit [259634] by youenn@apple.com
  • 2 edits in trunk/Tools

Reset mock capture devices between layout tests
https://bugs.webkit.org/show_bug.cgi?id=210098

Reviewed by Eric Carlson.

This fixes fast/mediastream/anonymize-device-name.html
failure since https://trac.webkit.org/changeset/259477/webkit.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

7:04 AM EnvironmentVariables edited by clopez@igalia.com
(diff)
4:52 AM Changeset in webkit [259633] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

Initialization of modal nodes should happen lazily, not in the AXObjectCache constructor.
https://bugs.webkit.org/show_bug.cgi?id=210090

Reviewed by Chris Fleizach.

  • The initialization of modal nodes was performed in the AXObjectCache

constructor, which is not necessary. Instead, this change performs the
initialization of the modal nodes before they are needed.

  • updateCurrentModalNode was replaced with currentModalNode, and its

implementation cleaned up.

  • Now the initialization and update of AXObjectCached::m_modalNodesSet

and m_currentMOdalNode is clearer.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::findModalNodes):
(WebCore::AXObjectCache::currentModalNode const):
(WebCore::AXObjectCache::modalNode):
(WebCore::AXObjectCache::handleModalChange):
(WebCore::AXObjectCache::updateCurrentModalNode): Renamed currentModalNode.

  • accessibility/AXObjectCache.h:
4:14 AM Changeset in webkit [259632] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData
https://bugs.webkit.org/show_bug.cgi?id=209969

Reviewed by Eric Carlson.

Instead of allocating a new buffer for every audio chunk and copy the audio chunk,
Create a WebAudioBufferList once (without any buffer allocation) and set the audio buffer pointer
given by libwebrtc as the WebAudioBufferList buffer pointer.
We do not take care of muted state anymore since this is done by consumers anyway.
Covered by existing tests.

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:

(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h:
2:47 AM Changeset in webkit [259631] by Claudio Saavedra
  • 3 edits in trunk/Source/WebCore

[GTK] gtk_icon_info_free is deprecated since GTK+ 3.8
https://bugs.webkit.org/show_bug.cgi?id=118381

Reviewed by Carlos Garcia Campos.

GtkIconInfo is a GObject since 3.8, update accordingly.

  • platform/graphics/gtk/ImageGtk.cpp:

(WebCore::loadMissingImageIconFromTheme):

  • platform/gtk/GUniquePtrGtk.h:
1:25 AM Changeset in webkit [259630] by Doug Kelly
  • 3 edits in trunk/Source/WebCore

Add release asserts to KeyframeEffectStack::ensureEffectsAreSorted()
https://bugs.webkit.org/show_bug.cgi?id=210084
<rdar://problem/61359275>

Reviewed by Ryosuke Niwa.

To ensure any potential problems in KeyframeEffectStack::ensureEffectsAreSorted() are found closer to the
root cause, add several RELEASE_ASSERTs throughout this function (and its associated comparison function).
This should guard against null pointers/null WeakPtrs, as well as other state problems which would be
unexpected for the comparison function used by std::sort.

No new tests; this only adds additional asserts, so there is no change to functionality, and this code is
covered by existing tests.

  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::ensureEffectsAreSorted):

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareAnimationsByCompositeOrder):

12:55 AM Changeset in webkit [259629] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Use GlobalFrameIdentifier in NavigationAction
https://bugs.webkit.org/show_bug.cgi?id=210036

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-07
Reviewed by Darin Adler.

Source/WebCore:

Use GlobalFrameIdentifier in NavigationAction rather than adding
yet another custom data type.

  • loader/NavigationAction.cpp:

(WebCore::createGlobalFrameIdentifier):
(WebCore::m_globalFrameIdentifier):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::Requester::globalFrameIdentifier const):
(WebCore::NavigationAction::Requester::pageID const): Deleted.
(WebCore::NavigationAction::Requester::frameID const): Deleted.

Source/WebKit:

Adapt to API change.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

12:17 AM Changeset in webkit [259628] by Alan Coon
  • 1 copy in tags/Safari-610.1.8.3

Tag Safari-610.1.8.3.

12:01 AM Changeset in webkit [259627] by Alan Coon
  • 8 edits in branches/safari-610.1.8-branch/Source

Versioning.

Apr 6, 2020:

11:58 PM Changeset in webkit [259626] by Alan Coon
  • 1 copy in branches/safari-610.1.9-branch

New branch.

11:54 PM Changeset in webkit [259625] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

11:29 PM Changeset in webkit [259624] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in CompositeEditCommand::splitTreeToNode when inserting image in anchor element that has uneditable parent
https://bugs.webkit.org/show_bug.cgi?id=210004
<rdar://problem/61206583>

Reviewed by Ryosuke Niwa.

Source/WebCore:

RemoveNodePreservingChildren can fail and leave the children dangling if the parent of the node
is uneditable. Added editability check for the to-be-removed node.

Test: editing/inserting/insert-img-anchor-uneditable-parent.html

  • editing/RemoveNodePreservingChildrenCommand.cpp:

(WebCore::RemoveNodePreservingChildrenCommand::doApply):

LayoutTests:

Added a regression test for the crash.

  • editing/inserting/insert-img-anchor-uneditable-parent-expected.txt: Added.
  • editing/inserting/insert-img-anchor-uneditable-parent.html: Added.
9:59 PM Changeset in webkit [259623] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening EXIF orientation failure.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
8:39 PM Changeset in webkit [259622] by Peng Liu
  • 3 edits
    1 add in trunk/Tools

REGRESSION (r259531?): [iOS] TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia is timing out
https://bugs.webkit.org/show_bug.cgi?id=210013

Reviewed by Daniel Bates.

Fix mistakes in the test and make it more reliable.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:

(-[ScrollingDoesNotPauseMediaDelegate handleEvent:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/one-video.html: Added.
7:23 PM Changeset in webkit [259621] by mmaxfield@apple.com
  • 4 edits in trunk/LayoutTests

[Cocoa] REGRESSION(r254389): fast/text/international/system-language/declarative-language.html is failing
https://bugs.webkit.org/show_bug.cgi?id=208023
<rdar://problem/59461792>

Reviewed by Simon Fraser.

minimizedLanguagesFromLanguages() is supposed to minimize the language list;
that's its whole raison d'être

  • fast/text/international/system-language/declarative-language-expected.txt:
  • fast/text/international/system-language/declarative-language.html:
  • platform/mac/TestExpectations:
7:16 PM Changeset in webkit [259620] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Use-after-move of Vector<ManipulationToken> in TextManipulationController::observeParagraphs()
<https://webkit.org/b/210086>

Reviewed by Ryosuke Niwa.

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::observeParagraphs):

  • Replace WTFMove() with std::exchange() to fix the clang static analyzer warning. For WTF::Vector, this has no change in behavior.
6:45 PM Changeset in webkit [259619] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in WebCore::lastPositionInNode when indenting text node that has user-select:all parent.
https://bugs.webkit.org/show_bug.cgi?id=210016
<rdar://problem/61014577>

Reviewed by Ryosuke Niwa.

Source/WebCore:

In rangeForParagraphSplittingTextNodesIfNeeded, added null check for previousSibling()
after splitTextNode is called, and returns empty positions to caller.

In formatSelection, check the returned positions from rangeForParagraphSplittingTextNodesIfNeeded
and stop indenting the rest of the paragraphs.

Test: fast/editing/indent-pre-user-select-all-crash.html

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::formatSelection):
(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):

LayoutTests:

Added a regression test for the crash.

  • fast/editing/indent-pre-user-select-all-crash-expected.txt: Added.
  • fast/editing/indent-pre-user-select-all-crash.html: Added.
6:04 PM Changeset in webkit [259618] by Devin Rousso
  • 4 edits in trunk/Source

Web Inspector: console.log(...) appear as CONSOLE LOG LOG in the system console
https://bugs.webkit.org/show_bug.cgi?id=210083

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • runtime/ConsoleClient.cpp:

(JSC::appendMessagePrefix):

Source/WebCore:

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::addMessage):
Use the actual MessageSource and MessageType when printing console messages.

5:58 PM Changeset in webkit [259617] by don.olmstead@sony.com
  • 5 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=210059

Reviewed by Fujii Hironori.

.:

Add a DumpRenderTree derived sources directory.

  • Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake code to use WEBKIT_EXECUTABLE when creating DumpRenderTree.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
5:26 PM Changeset in webkit [259616] by Jonathan Bedard
  • 2 edits in trunk/Tools

ImageDiff: Don't build with ASan in automation
https://bugs.webkit.org/show_bug.cgi?id=210057
<rdar://problem/61234753>

Reviewed by David Kilzer.

  • ImageDiff/cg/Configurations/ImageDiff.xcconfig: Disable ASan.
5:11 PM Changeset in webkit [259615] by Kate Cheney
  • 7 edits in trunk/Source/WebKit

Create a way to signal if the WKAppBoundDomains list is empty
https://bugs.webkit.org/show_bug.cgi?id=210074
<rdar://problem/61359228>

Reviewed by Brent Fulgham.

Updates the WebFramePolicyListener to return an Optional<NavigatingToAppBoundDomain>
to signal if the WKAppBoundDomains list is empty. If so, we don't want to update
any app-bound domain parameters in WebPageProxy.

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveAppBoundDomainResult):

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

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

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

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::beginAppBoundDomainCheck):
Changed the WebFramePolicyListener to take a NavigatingToAppBoundDomain
type as opposed to a boolean to allow it to handle the empty value.

5:11 PM Changeset in webkit [259614] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: 68000 JSC tests failing.
https://bugs.webkit.org/show_bug.cgi?id=210078
<rdar://problem/61364513>

Reviewed by Yusuke Suzuki.

The missing exception check is in jsc shell's GlobalObject::finishCreation().
Since this is just a debugging tool, and this exception will never be thrown in
practice, I've placated the validator by RELEASE_ASSERT'ing that the exception
will never be thrown.

  • jsc.cpp:
5:00 PM Changeset in webkit [259613] by wenson_hsieh@apple.com
  • 4 edits in trunk/Source/WebCore

REGRESSION: 4 TestWebKitAPI.DragAndDropTests.DataTransferSetData tests failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=209685
<rdar://problem/60987461>

Reviewed by Megan Gardner.

After updating a WebKit open source test runner to iOS 13.4, 4 pasteboard-related API tests began to fail in
release builds on that particular bot. Logging statements added in r259465, r259518, r259534, and r259541
strongly suggest that this is due to an IPC dispatch race when clearing the platform pasteboard before writing
custom pasteboard data. On iOS, the former is dispatched asynchronously, while the latter is dispatched as sync
IPC. This means that if the UI process happens to be waiting for a sync IPC response from the web process, it
will end up handling the incoming IPC messages out of order by immediately dispatching sync IPC (in this case,
writing custom pasteboard data) before dispatching the async IPC (clearing data). This causes the custom
pasteboard data to be cleared on the platform pasteboard immediately after it is written.

To fix this, we limit clearing pasteboard data to when we would've otherwise avoided writing any custom
pasteboard data, and additionally make it so that writing custom pasteboard data always clears out any pre-
existing content on the pasteboard (obviating the need for a separate message to clear the pasteboard). Note
that writing custom pasteboard data always clears the existing pasteboard on macOS and iOS -- on macOS, we use
-declareTypes:owner:; on iOS, we use -setItemProviders:; in the case of macCatalyst, we -setItems:.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::commitToPasteboard):

Push the call to clear the pasteboard down from the call sites of commitToPasteboard into commitToPasteboard
itself; then, only explicitly clear the pasteboard in the case where we aren't writing custom pasteboard data
(i.e. either custom pasteboard data is disabled, or there is no data to write),

(WebCore::DataTransfer::moveDragState): See above.

  • editing/Editor.cpp:

(WebCore::dispatchClipboardEvent): See above.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Remove always-on logging added in r259541 to help diagnose the test failures.

4:39 PM Changeset in webkit [259612] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mac wk1 Debug ] inspector/debugger/evaluateOnCallFrame-errors.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=210079

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:34 PM Changeset in webkit [259611] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Delete line boxes when moving text renderers between block flows
https://bugs.webkit.org/show_bug.cgi?id=210000

Reviewed by Antti Koivisto.

After style and/or tree mutation the existing line boxes are destroyed during the subsequent layout.
When the text renderer moves between block flows and the destination block flow initiates a different
type of line layout, we need to make sure the previous line content is cleaned up properly.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutSimpleLines):
(WebCore::RenderBlockFlow::layoutLFCLines):

  • rendering/RenderText.cpp:

(WebCore::RenderText::removeAndDestroyTextBoxes):
(WebCore::RenderText::dirtyLineBoxes):
(WebCore::RenderText::deleteLineBoxes):

  • rendering/RenderText.h:
4:25 PM Changeset in webkit [259610] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[iOS] Transition most process assertions to RunningBoard
https://bugs.webkit.org/show_bug.cgi?id=210065
<rdar://problem/61354901>

Reviewed by Geoffrey Garen.

Transition most process assertions to RunningBoard, instead of legacy BKSProcessAssertion.
The only assertion that still uses BKSProcessAssertion is the MediaPlayback once because
we do not have a RunningBoard equivalent for this one yet (see <rdar://problem/61263147>).

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKRBSAssertionDelegate assertionWillInvalidate:]):
(-[WKRBSAssertionDelegate assertion:didInvalidateWithError:]):
(WebKit::runningBoardNameForAssertionType):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):
(WebKit::ProcessAssertion::processAssertionWasInvalidated):

4:17 PM Changeset in webkit [259609] by Alan Coon
  • 1 edit in branches/safari-609.2.1.2-branch/Source/WebKit/UIProcess/WebPageProxy.cpp

Unreviewed build fix. rdar://problem/61231877

No member named 'counts' in 'WebKit::WebBackForwardList'

4:17 PM Changeset in webkit [259608] by Alan Coon
  • 1 edit in branches/safari-609.2.1.2-branch/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

Unreviewed build fix. rdar://problem/61231922

Change DoubleEqualAndOrdered to DoubleEqual to avoid build failure.

4:16 PM Changeset in webkit [259607] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Update my committer status
https://bugs.webkit.org/show_bug.cgi?id=210072

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-06
Reviewed by Dean Jackson.

Update contributors.json to reflect that my lapsed committer
status was recently reinstated.

  • Scripts/webkitpy/common/config/contributors.json:
4:15 PM Changeset in webkit [259606] by Ross Kirsling
  • 219 edits
    10 adds
    2 deletes in trunk

Update minimum ICU version to 60.2
https://bugs.webkit.org/show_bug.cgi?id=209694

Reviewed by Darin Adler.

.:

  • Source/cmake/OptionsAppleWin.cmake:
  • Source/cmake/OptionsCommon.cmake:
  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWinCairo.cmake:

Indicate 60.2 as minimum version (as required by GTK for supporting Ubuntu 18.04 LTS).
Also ensure that the C++ API is hidden for all platforms.

Source/JavaScriptCore:

  • icu/LICENSE: Deleted.
  • icu/README: Deleted.

Remove leftover files following r219155.

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::UFieldPositionIteratorDeleter::operator() const):
(JSC::IntlDateTimeFormat::partTypeString):
(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):
(JSC::IntlDateTimeFormatPrototypeFuncFormatToParts):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::partTypeString):
(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):
(JSC::IntlNumberFormatPrototypeFuncFormatToParts):

  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::resolvedOptions):
(JSC::IntlPluralRules::select):

  • runtime/IntlPluralRules.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::decode):
Remove obsoleted compile-time version checks.

Source/WebCore:

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • icu/LICENSE: Deleted.
  • icu/README: Deleted.

Remove leftover files following r219155 as well as a corresponding Xcode step.

  • editing/cocoa/DataDetection.mm:

(WebCore::buildQuery):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot const):

  • platform/cocoa/KeyEventCocoa.mm:

(WebCore::keyForCharCode):

  • platform/cocoa/TelephoneNumberDetectorCocoa.cpp:

(WebCore::TelephoneNumberDetector::find):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::createFontForCharacters):
(WebCore::FontCache::prewarm):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::provideStringAndAttributes):

  • platform/graphics/mac/GlyphPageMac.cpp:

(WebCore::GlyphPage::fill):
Manually convert between UChar and UniChar/unichar where needed.

  • platform/text/CharacterProperties.h:

(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiWithPresentationByDefault):
(WebCore::isEmojiModifierBase):
(WebCore::icuLibraryUnderstandsSupplementalSymbolsAndPictographs): Deleted.
Remove obsoleted compile-time and runtime version checks.

Source/WebKit:

  • WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:

(-[WKDOMTextIterator currentTextPointer]):
Manually convert between UChar and UniChar/unichar where needed.

Source/WebKitLegacy/mac:

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:]):
(-[NSString _web_widthWithFont:]):

  • WebCoreSupport/WebVisitedLinkStore.mm:

(WebVisitedLinkStore::addVisitedLink):

  • WebView/WebTextIterator.mm:

(-[WebTextIterator currentTextPointer]):
Manually convert between UChar and UniChar/unichar where needed.

Source/WTF:

This patch has two immediate motivations:

  1. To properly introduce a minimum ICU version for WebKit as a whole (responding to a pain point identified in bug 209579)
  2. To support the development of ECMA-402 Intl API features, which JSC is quite behind on (and which often boil down to exposing ICU functionality to JavaScript)
  • icu/LICENSE:
  • icu/README:
  • icu/unicode/:

Update ICU headers to major version 62, the version included in macOS Mojave.

  • wtf/text/AtomString.h:
  • wtf/text/WTFString.h:

Remove obsoleted compile-time version checks.

  • wtf/text/cocoa/StringCocoa.mm:

(WTF::String::String):

  • wtf/text/cocoa/StringViewCocoa.mm:

(WTF::StringView::createNSString const):
(WTF::StringView::createNSStringWithoutCopying const):
Manually convert between UChar and UniChar/unichar where needed.

Tools:

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

Remove obsoleted compile-time version checks.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::runUIScript):

  • TestWebKitAPI/Tests/WebCore/LineBreaking.mm:

(breakingLocationsFromICU):
Manually convert between UChar and UniChar/unichar where needed.

4:05 PM Changeset in webkit [259605] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r259580. rdar://problem/61352477

CrashTracer: MobileSafari at WebKit: WebKit::SystemPreviewController::updateProgress
https://bugs.webkit.org/show_bug.cgi?id=210040
rdar://51410841

Reviewed by Darin Adler.

It appears that the SystemPreviewController on WebPageProxy can
become null causing a call to an in-progress download to crash
as it tries to talk to the QuickLook delegate. Guard against this
by checking the SystemPreviewController each time.

  • UIProcess/Cocoa/DownloadClient.mm: (WebKit::systemPreviewController): (WebKit::DownloadClient::didReceiveResponse): (WebKit::DownloadClient::didReceiveData): (WebKit::DownloadClient::processDidCrash): (WebKit::DownloadClient::didFinish): (WebKit::DownloadClient::didFail): (WebKit::DownloadClient::didCancel):

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

4:05 PM Changeset in webkit [259604] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259538. rdar://problem/61352452

Additional sanity checks in compareAnimationsByCompositeOrder()
https://bugs.webkit.org/show_bug.cgi?id=209996

Reviewed by Geoffrey Garen.

compareAnimationsByCompositeOrder() is used by std::sort() which requires strict weak ordering.
This adds additional checks to ensure strict weak ordering is maintained, first by ensuring
the transitionProperty string is different before returning that comparison, then by only using
if the animation is a CSSTransition or CSSAnimation if the left hand and right hand sides differ.
This should leave all remaining cases to sort by the global animation list.

No new tests; this should be covered by existing tests and should not change functionality
otherwise.

  • animation/WebAnimationUtilities.cpp: (WebCore::compareAnimationsByCompositeOrder):

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

4:05 PM Changeset in webkit [259603] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259519. rdar://problem/61352446

ASSERTION FAILED: objectStoreInfo in SQLiteIDBBackingStore::getRecord
https://bugs.webkit.org/show_bug.cgi?id=209976
<rdar://problem/55005363>

Reviewed by Geoffrey Garen.

Return error if objectStoreInfo is null in SQLiteIDBBackingStore::getRecord, because there is a possibility
SQLiteIDBBackingStore does not have requested objectStoreInfo.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):

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

4:05 PM Changeset in webkit [259602] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r259424. rdar://problem/61352472

[JSC] RecordedStatuses's assignment should be guarded by CodeBlock's lock
https://bugs.webkit.org/show_bug.cgi?id=209935
<rdar://problem/59443383>

Reviewed by Mark Lam.

Previously RecordedStatuses are not touched by GC. But now, GC visits RecordedStatuses.
This means that modifying RecordedStatuses should be guarded by CodeBlock's lock if
it is reachable from CodeBlock.
In DFG::Plan::reallyAdd, we already installed DFG::JITCode into the CodeBlock so that
RecordedStatuses is reachable from CodeBlock. We should lock CodeBlock's lock while
performing WTFMove(RecordedStatuses).

We do not need to emit write-barrier here because (1) DFG::Plan::reallyAdd is executed
while GC is deferred and (2) we emit write-barrier to CodeBlock before deferred GC is executed.

  • dfg/DFGPlan.cpp: (JSC::DFG::Plan::reallyAdd):

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

4:05 PM Changeset in webkit [259601] by Alan Coon
  • 12 edits in branches/safari-609-branch/Source

Cherry-pick r259315. rdar://problem/61352448

Regression(r253357) DeviceMotionEvent acceleration and rotationRate are null
https://bugs.webkit.org/show_bug.cgi?id=209831
<rdar://problem/60720953>

Reviewed by Darin Adler.

Source/WebCore:

The issue was that DeviceMotionClientIOS::motionChanged() would only initialize the
acceleration and rotationRate if [m_motionManager gyroAvailable] returned YES. After
r253357, m_motionManager is nil because we get motion data from the UIProcess so
[m_motionManager gyroAvailable] would always resolve to NO.

To address the issue, I made the rotationRate parameters to motionChanged() optional
and we rely on them being set to know if gyro data is available. Note that I did not
make the acceleration optional because according to [1], all devices have an
accelerometer.

[1] https://developer.apple.com/documentation/coremotion/cmmotionmanager/1616094-devicemotionavailable?language=objc

  • platform/ios/DeviceMotionClientIOS.h:
  • platform/ios/DeviceMotionClientIOS.mm: (WebCore::DeviceMotionClientIOS::motionChanged):
  • platform/ios/DeviceOrientationUpdateProvider.h:
  • platform/ios/MotionManagerClient.h: (WebCore::MotionManagerClient::motionChanged):
  • platform/ios/WebCoreMotionManager.mm: (-[WebCoreMotionManager sendAccelerometerData:]):

Source/WebKit:

  • UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h:
  • UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm: (WebKit::WebDeviceOrientationUpdateProviderProxy::motionChanged):
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp: (WebKit::WebDeviceOrientationUpdateProvider::deviceMotionChanged):
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h:
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in:

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

4:05 PM Changeset in webkit [259600] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r259264. rdar://problem/61352442

[JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=209791

Reviewed by Saam Barati.

DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition.

  • dfg/DFGArrayMode.cpp: (JSC::DFG::ArrayMode::alreadyChecked const):
  • dfg/DFGArrayMode.h: (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):

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

4:05 PM Changeset in webkit [259599] by Alan Coon
  • 14 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r258434. rdar://problem/61352465

Safari sometimes crashes when switch video into PiP mode
https://bugs.webkit.org/show_bug.cgi?id=208904

Reviewed by Simon Fraser.

With this patch, MediaControlTextTrackContainerElement won't paint its subtree
to an image buffer (for the captions in video fullscreen or picture-in-picture mode)
when the cues are updated. Instead, it only sets the flag m_needsGenerateTextTrackRepresentation
to true after running layout based on the new cues. After that, it paints its subtree
to an image buffer if needed at the end of Page::updateRendering() when the layout is clean.
TextTrackRepresentationCocoa will use the image buffer to set the content of the layer
for captions in video fullscreen or picture-in-picture mode.

MediaControlTextTrackContainerElement class is responsible for rendering the captions in both:
1) a video player in the inline mode.
2) a video player in "video fullscreen" or picture-in-picture mode.
This patch refactors some functions to make their responsibilities clear.

  • Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::updateTextTrackRepresentationImageIfNeeded):
  • Modules/mediacontrols/MediaControlsHost.h:
  • dom/Document.cpp: (WebCore::Document::setMediaElementShowingTextTrack): (WebCore::Document::clearMediaElementShowingTextTrack): (WebCore::Document::updateTextTrackRepresentationImageIfNeeded):
  • dom/Document.h:

Functions textTracksAreReady(), textTrackReadyStateChanged() and configureTextTrackDisplay()
should be wrapped with "#if ENABLE(VIDEO_TRACK)".

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setTextTrackRepresentation): (WebCore::HTMLMediaElement::textTracksAreReady const): (WebCore::HTMLMediaElement::textTrackReadyStateChanged): (WebCore::HTMLMediaElement::configureTextTrackDisplay): (WebCore::HTMLMediaElement::updateTextTrackRepresentationImageIfNeeded):
  • html/HTMLMediaElement.h:
  • html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::createElementRenderer): (WebCore::MediaControlTextTrackContainerElement::updateDisplay): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationImageIfNeeded): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationIfNeeded): (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackStyle): (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): (WebCore::MediaControlTextTrackContainerElement::updateVideoDisplaySize): (WebCore::MediaControlTextTrackContainerElement::updateSizes): (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged): (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Deleted. (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationStyle): Deleted. (WebCore::MediaControlTextTrackContainerElement::layoutIfNecessary): Deleted. (WebCore::MediaControlTextTrackContainerElement::updateCueStyles): Deleted.
  • html/shadow/MediaControlElements.h:
  • html/shadow/MediaControls.cpp: (WebCore::MediaControls::updateTextTrackRepresentationImageIfNeeded):
  • html/shadow/MediaControls.h:
  • page/Page.cpp: (WebCore::Page::updateRendering):
  • rendering/RenderMediaControlElements.cpp: (WebCore::RenderMediaControlTextTrackContainer::RenderMediaControlTextTrackContainer): (WebCore::RenderMediaControlTextTrackContainer::layout): (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): Deleted. (WebCore::RenderTextTrackContainerElement::layout): Deleted.
  • rendering/RenderMediaControlElements.h:

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

3:47 PM Changeset in webkit [259598] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/JavaScriptCore

Cherry-pick r259264. rdar://problem/61352437

[JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=209791

Reviewed by Saam Barati.

DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition.

  • dfg/DFGArrayMode.cpp: (JSC::DFG::ArrayMode::alreadyChecked const):
  • dfg/DFGArrayMode.h: (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):

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

2:59 PM Changeset in webkit [259597] by Simon Fraser
  • 21 edits in trunk/Source

Make ScrollableArea TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210042

Reviewed by Darin Adler.

ScrollableArea is a pure virtual base class, so has to dump via a virtual function,
so add debugDescription() and implement it in derived classes.

Make the common pattern be that operator<<(TextStream&, ...) calls debugDescription.

Source/WebCore:

  • page/Frame.cpp:

(WebCore::Frame::debugDescription const):
(WebCore::operator<<):

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

(WebCore::FrameView::debugDescription const):
(WebCore::operator<<):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::debugDescription const):

  • platform/ScrollView.h:
  • platform/ScrollableArea.cpp:

(WebCore::operator<<):

  • platform/ScrollableArea.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::debugDescription const):
(WebCore::RenderLayer::calculateClipRects const):

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

(WebCore::RenderLayerCompositor::updateCompositingLayers):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::debugDescription const):

  • rendering/RenderListBox.h:

Source/WebKit:

  • UIProcess/win/WebPopupMenuProxyWin.cpp:

(WebKit::WebPopupMenuProxyWin::debugDescription const):

  • UIProcess/win/WebPopupMenuProxyWin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::debugDescription const):

2:59 PM Changeset in webkit [259596] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

storage/indexeddb/value-cursor-cycle.html is flaky failing because it incorrectly thinks our JS GC is precise.
https://bugs.webkit.org/show_bug.cgi?id=210046

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:44 PM Changeset in webkit [259595] by Jack Lee
  • 3 edits
    2 adds in trunk

Nullptr crash in CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary with draggable text
https://bugs.webkit.org/show_bug.cgi?id=209999
<rdar://problem/58978340>

Reviewed by Ryosuke Niwa.

Source/WebCore:

VisibleParagraphStart/End may return empty VisiblePosition if no proper element or node
can be used as position candidate. Add null check for the returned VisiblePositions.

Test: fast/css/style-change-draggable-text.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):

LayoutTests:

Added a regression test for the crash.

  • fast/css/style-change-draggable-text-expected.txt: Added.
  • fast/css/style-change-draggable-text.html: Added.
1:53 PM Changeset in webkit [259594] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Strengthen the ASSERT in ImageDecoderAVFObjC::storeSampleBuffer().
https://bugs.webkit.org/show_bug.cgi?id=209972
<rdar://problem/60727431>

Reviewed by Brent Fulgham.

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

(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):

1:48 PM Changeset in webkit [259593] by jer.noble@apple.com
  • 4 edits in trunk

[ Mac wk2 ] http/tests/media/track-in-band-hls-metadata.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=209490
<rdar://problem/60837555>

Reviewed by Darin Adler.

Source/WebCore:

To ensure the TaskDispatcher doesn't get destroyed on a background thread at the same time it's
executing tasks on the main thread, when a GenericTaskQueue is destroyed on a background thread,
move the TaskDispatcher into a task, and use the dispatcher itself to destroy itself on the
main thread.

  • platform/GenericTaskQueue.h:

(WebCore::GenericTaskQueue::GenericTaskQueue):
(WebCore::GenericTaskQueue::~GenericTaskQueue):
(WebCore::GenericTaskQueue::enqueueTask):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
1:37 PM Changeset in webkit [259592] by Manuel Rego Casasnovas
  • 9 edits in trunk/LayoutTests

[GTK][WPE] Re-enable WPT web-animations animation-types tests and updating baselines
https://bugs.webkit.org/show_bug.cgi?id=186139

Reviewed by Carlos Alberto Lopez Perez.

These tests are no longer timing out, so this patch unflags them from TestExpectations.
Apart from that the -expected.txt baselines are updated too.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
1:36 PM Changeset in webkit [259591] by commit-queue@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r259469.
https://bugs.webkit.org/show_bug.cgi?id=210066

Introduced media playback regression (Requested by perarne on
#webkit).

Reverted changeset:

"[iOS] Deny mach lookup access to the runningboard service in
the WebContent process"
https://bugs.webkit.org/show_bug.cgi?id=209933
https://trac.webkit.org/changeset/259469

1:26 PM Changeset in webkit [259590] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed sandbox compile fix.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1:12 PM Changeset in webkit [259589] by commit-queue@webkit.org
  • 539 edits
    258 adds
    19 deletes in trunk/Source/ThirdParty/ANGLE

Update ANGLE to 2020-03-27
https://bugs.webkit.org/show_bug.cgi?id=209689

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-06
Reviewed by Darin Adler.

Use update-angle.sh script by James Darpinian to roll ANGLE to
commit b387ce9389ede6a4ed3b831ab1b8187927fa295f in
https://chromium.googlesource.com/angle/angle .

changes.diff has been auto-updated with Apple's diffs relative to
upstream. No additional manual changes are made in this roll.
Long autogenerated file list omitted.

1:07 PM Changeset in webkit [259588] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=210038

Reviewed by Darin Adler.

Clang 10 reports a compilation warning in JavaScriptCore:

..\..\Source\JavaScriptCore\bytecode/CodeBlock.cpp(3002,24): warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion]

if (doubleResult > std::numeric_limits<size_t>::max())

~ ~

Use a template variable maxPlusOne<T> which was added by r259537
for the purpose.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::predictedMachineCodeSize): Replaced '>' with '>=',
and std::numeric_limits<size_t>::max() with maxPlusOne<size_t>.

12:01 PM Changeset in webkit [259587] by Alexey Shvayka
  • 7 edits
    1 delete in trunk

Remove unnecessary Test262 harness file and implement $262.IsHTMLDDA
https://bugs.webkit.org/show_bug.cgi?id=187526

Reviewed by Darin Adler.

JSTests:

  • stress/optional-chaining.js: Adjust test for callable masquerader.

Source/JavaScriptCore:

Test262 harness requires [1] $262.IsHTMLDDA to be an object with IsHTMLDDA? slot [2],
much like document.all. It is used in a few tests to make sure that runtimes strictly
compare values with null and undefined.

With this change, makeMasquerader returns callable masquerader to mimic document.all
in the wild. In order to avoid masqueradesAsUndefinedWatchpoint being fired during
initialization of JSC shell, $262.IsHTMLDDA is a getter.

[1]: https://github.com/tc39/test262/blob/master/INTERPRETING.md#host-defined-functions
[2]: https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot

  • jsc.cpp:

(functionMakeMasquerader):
(functionCallMasquerader):
(JSC::Masquerader::Masquerader): Deleted.
(JSC::Masquerader::subspaceFor): Deleted.
(JSC::Masquerader::create): Deleted.
(JSC::Masquerader::createStructure): Deleted.

  • runtime/JSObject.h:

Tools:

Removed file duplicates functionality of jsc.cpp's GlobalObject::finishCreation.

  • Scripts/test262/Runner.pm:
  • Scripts/test262/agent.js: Removed.
11:55 AM Changeset in webkit [259586] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ macOS ] inspector/debugger/break-in-constructor-before-super.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=210062

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:54 AM Changeset in webkit [259585] by Antti Koivisto
  • 9 edits
    2 adds in trunk

'currentcolor' doesn't need setHasExplicitlyInheritedProperties marking anymore
https://bugs.webkit.org/show_bug.cgi?id=210017

Reviewed by Darin Adler.

Source/WebCore:

Removing this marking reveals problems in style update avoidance code in CSSComputedStyleDeclaration
that also need to be addressed. The problems are not specific to exlicit 'currentcolor', they also reproduce
with the initial value (thus the new test).

Test: fast/css/currentColor-initial-style-update.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::nonInheritedColorPropertyHasValueCurrentColor):

Add a helper.

(WebCore::hasValidStyleForProperty):

Treat a non-inherited color property as inherited if it is 'currentcolor'.

(WebCore::updateStyleIfNeededForProperty):

Expand shorthands so properties like border-color test correctly.

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isColorProperty):

Move here from CSSParserFastPaths.

  • css/CSSProperty.h:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::maybeParseValue):
(WebCore::isColorPropertyID): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::unresolvedColorForProperty const):

Factor into a helper.
Handle all color values.

(WebCore::RenderStyle::colorResolvingCurrentColor const):

Renamed for clarity and some cleanups.

(WebCore::RenderStyle::visitedDependentColor const):
(WebCore::RenderStyle::colorIncludingFallback const): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isCurrentColor):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::colorFromPrimitiveValue const):

Remove setHasExplicitlyInheritedProperties marking.

LayoutTests:

  • fast/css/currentColor-initial-style-update-expected.txt: Added.
  • fast/css/currentColor-initial-style-update.html: Added.
11:48 AM Changeset in webkit [259584] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Remove unused header in web process
https://bugs.webkit.org/show_bug.cgi?id=210053

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-04-06
Reviewed by Michael Catanzaro.

Remove unused headers from code removed in r203774.

No new tests required.

  • WebProcess/gtk/WebProcessMainGtk.cpp:
11:48 AM Changeset in webkit [259583] by justin_michaud@apple.com
  • 38 edits
    7 adds in trunk

Allow deleteById to be cached in the DFG
https://bugs.webkit.org/show_bug.cgi?id=208664

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/delete-property-allocation-sinking.js: Added.

(assert):
(noInline.assert.blackbox):
(noInline.blackbox.doAlloc1):
(noInline.doAlloc1):

  • microbenchmarks/polyvariant-delete-property.js: Added.

(assert):
(blackbox):
(noInline.blackbox.polyvariant):
(doAlloc1):
(noInline.doAlloc1.doAlloc2):
(noInline.doAlloc2):

  • stress/delete-property-dfg-inline.js: Added.

(assert):
(noInline.assert.assert_throws):
(noInline.assert_throws.blackbox):
(noInline.blackbox.testSingleStructure.doAlloc1):
(noInline.blackbox.testSingleStructure):
(noInline.testSingleStructure.testInlineSingleStructure.doDelete2):
(noInline.testSingleStructure.testInlineSingleStructure.doAlloc2):
(noInline.testSingleStructure.testInlineSingleStructure):
(noInline.testInlineSingleStructure.testExit.doDelete3):
(noInline.testInlineSingleStructure.testExit):
(noInline.testExit.testSingleStructureMiss.doAlloc4):
(noInline.testExit.testSingleStructureMiss):
(noInline.testSingleStructureMiss.testSingleStructureMissStrict.string_appeared_here.doAlloc5):
(noInline.testSingleStructureMiss.testSingleStructureMissStrict):
(noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable.doAlloc6):
(noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable):
(noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty.doAlloc7):
(noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty):
(noInline.testSingleStructureEmpty.testPolymorphic.doDelete8):
(noInline.testSingleStructureEmpty.testPolymorphic):
(noInline.testPolymorphic.testPolyvariant.doDelete9):
(noInline.testPolymorphic.testPolyvariant.polyvariant):
(noInline.testPolymorphic.testPolyvariant):
(noInline.testPolyvariant.testConstantFolding.doDelete10):
(noInline.testPolyvariant.testConstantFolding):
(noInline.testConstantFolding.testObjectSinking.doAlloc11):
(noInline.testConstantFolding.testObjectSinking):
(noInline.testObjectSinking.testProxy.doAlloc12):
(noInline.testObjectSinking.testProxy.noInline.doDelete12):
(noInline.testObjectSinking.testProxy):
(noInline.testProxy.testTypedArray.doDelete12):
(noInline.testProxy.testTypedArray):
(noInline.testTypedArray.testMissMixed.doDelete13):
(noInline.testTypedArray.testMissMixed):
(noInline.testMissMixed.testMissNonMixed.doDelete14):
(noInline.testMissMixed.testMissNonMixed):
(noInline.testMissNonMixed.testByVal.doDelete15):
(noInline.testMissNonMixed.testByVal):

Source/JavaScriptCore:

When we see that the deleteById inline cache only saw one structure, we inline it into the DFG. This involves
creating a new node, FilterDeleteByStatus, and then turning these DeleteById nodes into a FilterDeleteByStatus,
CheckStructure, PutByOffset, then PutStructure (or just a CheckStructure in the case of a miss). The logic for
pessimising this optimization is the same as for PutById, giving inlined functions the opportunity to use only
the DFG profiling information, while everything else uses the DFG+Baseline information.

This also adds a MultiDeleteByOffset node, for the case when there are multiple structures seen by the delete. If
all of the cases are the same kind of miss, then we only emit a CheckStructure and constant.

Finally, if we see a delete by val with a single identifier, we inline that too.

This patch removes a dead code path from deleteProperty that checks if we need to nuke the object's butterfly.
This also fixes a bug where we were checking the neutering status of typed arrays for named properties when we should
only check for indexed properties. The behavior of this now matches for all tiers including when cached.

The benchmark shows a 2x improvement on polyvariant-delete-property, and a 50% improvement on delete-property-allocation-sinking.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::createDelete):
(JSC::AccessCase::generateImpl):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::getICStatusMap):

  • bytecode/DeleteByIdVariant.cpp: Added.

(JSC::DeleteByIdVariant::DeleteByIdVariant):
(JSC::DeleteByIdVariant::~DeleteByIdVariant):
(JSC::DeleteByIdVariant::operator=):
(JSC::DeleteByIdVariant::attemptToMerge):
(JSC::DeleteByIdVariant::writesStructures const):
(JSC::DeleteByIdVariant::visitAggregate):
(JSC::DeleteByIdVariant::markIfCheap):
(JSC::DeleteByIdVariant::dump const):
(JSC::DeleteByIdVariant::finalize):
(JSC::DeleteByIdVariant::dumpInContext const):

  • bytecode/DeleteByIdVariant.h: Added.

(JSC::DeleteByIdVariant::oldStructure const):
(JSC::DeleteByIdVariant::newStructure const):
(JSC::DeleteByIdVariant::result const):
(JSC::DeleteByIdVariant::offset const):
(JSC::DeleteByIdVariant::isPropertyUnset const):
(JSC::DeleteByIdVariant::identifier const):
(JSC::DeleteByIdVariant::overlaps):

  • bytecode/DeleteByStatus.cpp: Added.

(JSC::DeleteByStatus::appendVariant):
(JSC::DeleteByStatus::computeForBaseline):
(JSC::DeleteByStatus::DeleteByStatus):
(JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::DeleteByStatus::computeFor):
(JSC::DeleteByStatus::slowVersion const):
(JSC::DeleteByStatus::merge):
(JSC::DeleteByStatus::filter):
(JSC::DeleteByStatus::singleIdentifier const):
(JSC::DeleteByStatus::visitAggregate):
(JSC::DeleteByStatus::markIfCheap):
(JSC::DeleteByStatus::finalize):
(JSC::DeleteByStatus::dump const):

  • bytecode/DeleteByStatus.h: Added.
  • bytecode/ICStatusMap.h:
  • bytecode/RecordedStatuses.cpp:

(JSC::RecordedStatuses::operator=):
(JSC::RecordedStatuses::addDeleteByStatus):
(JSC::RecordedStatuses::visitAggregate):
(JSC::RecordedStatuses::markIfCheap):

  • bytecode/RecordedStatuses.h:

(JSC::RecordedStatuses::forEachVector):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitDeleteByOffset):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

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

  • dfg/DFGGraph.h:
  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.cpp:

(JSC::DFG::MultiDeleteByOffsetData::writesStructures const):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasMultiDeleteByOffsetData):
(JSC::DFG::Node::multiDeleteByOffsetData):
(JSC::DFG::Node::hasDeleteByStatus):
(JSC::DFG::Node::deleteByStatus):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):

  • dfg/DFGValidate.cpp:
  • dfg/DFGVarargsForwardingPhase.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty):

  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::mayHaveIndexingHeader const): Deleted.
(JSC::Structure::canCacheDeleteIC const): Deleted.

11:19 AM Changeset in webkit [259582] by sbarati@apple.com
  • 36 edits
    1 add
    4 deletes in trunk

Implement 1GB of executable memory on arm64
https://bugs.webkit.org/show_bug.cgi?id=208490
<rdar://problem/60797127>

Reviewed by Keith Miller.

JSTests:

Run JetStream2 wasm tests.

  • wasm.yaml:
  • wasm/lowExecutableMemory/executable-memory-oom.js:

PerformanceTests:

  • JetStream2/JetStreamDriver.js:

(Driver.prototype.dumpJSONResultsIfNeeded):
(DefaultBenchmark.prototype.updateUIAfterRun):
(DefaultBenchmark):
(WSLBenchmark.prototype.updateUIAfterRun):
(WSLBenchmark):
(WasmBenchmark.prototype.updateUIAfterRun):
(WasmBenchmark):
(Driver.async fetchResources.statusElement.innerHTML.a.href.string_appeared_here):
(Driver.prototype.async fetchResources):

Source/JavaScriptCore:

This patch implements the 1GB executable memory space on arm64. To make this
work, we implement jumps larger than +/-128MB to use jump islands. Jump islands
work by splitting up the ~1GB region into 9 112MB chunks (1008 MB total). Each
chunk is split into two: 96MB of executable region, and 16MB of jump island region.
With this split, any jump inside a jump island region can get to the adjacent
island (forwards or backwards) in a single +/-128MB jump. When linking a jump
from A to B, where |A - B| > 128MB, we instead point the jump to an island,
where this island has a potential series of jumps that finally lands at B.

To allocate executable memory, use a MetaAllocator for each 96MB chunk. To
allocate islands, we have a bit vector we use to track used and freed islands.
We only grow this bit vector as islands are allocated, so it frequently
remains empty or very small.

The goal of this patch is to have minimal perf impact when not using islands,
so the data structures are designed to only incur overhead when actually using
islands. We expect the use of islands to be minimal. We use a red black tree
to track all island locations. This allows us to deallocate all islands when
an executable memory handle is freed. Typically, this red black tree is empty,
so freeing an executable memory handle incurs no extra overhead.

To make islands work for Wasm, we now have to link tier up code in two phases.
Previously, we would just patch jumps concurrently to Wasm threads running after
resetting the icache, knowing that we would be able to atomically update the jump
instruction to point to the new destination. However, now when repatching these
jumps in a world with jump islands, we might need to allocate islands depending
on the jump location and its target. So we now allocate and collect the set of islands,
then reset the icache, then atomically update the branch to point to the destination
(or an island that jumps to the destination). One important implementation detail
here is that for normal island repatching, if we have a jump from A to B, and it
allocates a set if islands X, we usually can deallocate X when repatching A to go to B'.
This is because the typical repatch scenario in JS happens when that code is not being
executed. For Wasm though, those islands X might be running while we want to repatch
A to go to B'. So instead of deallocating X, we just append to X in this scenario, and
we free the new set X' when the code itself is freed.

(This patch also fixes a bug in the Wasm LLInt to BBQ tier up that I spotted,
where we would publish a LLInt callee's BBQ replacement before we finished
linking the outgoing calls of the BBQ replacement.)

This patch also removes the old "CodeProfiling" code that has been unused for
a long time.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::b):
(JSC::ARM64Assembler::bl):
(JSC::ARM64Assembler::replaceWithJump):
(JSC::ARM64Assembler::prepareForAtomicRelinkJumpConcurrently):
(JSC::ARM64Assembler::prepareForAtomicRelinkCallConcurrently):
(JSC::ARM64Assembler::computeJumpType):
(JSC::ARM64Assembler::canEmitJump):
(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::prepareForAtomicRepatchNearCallConcurrently):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::allocate):
(JSC::LinkBuffer::performFinalization):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::setIsJumpIsland):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):
(JSC::ExecutableAllocator::initializeUnderlyingAllocator):
(JSC::ExecutableAllocator::isValid const):
(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::getJumpIslandTo):
(JSC::ExecutableAllocator::getJumpIslandToConcurrently):
(JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator): Deleted.

  • jit/ExecutableAllocator.h:

(JSC::ExecutableAllocatorBase::allocate):

  • runtime/CommonSlowPaths.cpp:
  • runtime/Completion.cpp:

(JSC::evaluate):

  • runtime/JSModuleLoader.cpp:

(JSC::moduleLoaderParseModule):

  • runtime/OptionsList.h:
  • tools/CodeProfile.cpp:

(JSC::truncateTrace): Deleted.
(JSC::CodeProfile::sample): Deleted.
(JSC::CodeProfile::report): Deleted.

  • tools/CodeProfile.h:

(JSC::CodeProfile::CodeProfile): Deleted.
(JSC::CodeProfile::parent): Deleted.
(JSC::CodeProfile::addChild): Deleted.
(): Deleted.
(JSC::CodeProfile::CodeRecord::CodeRecord): Deleted.

  • tools/CodeProfiling.cpp:

(JSC::setProfileTimer): Deleted.
(JSC::profilingTimer): Deleted.
(JSC::CodeProfiling::sample): Deleted.
(JSC::CodeProfiling::notifyAllocator): Deleted.
(JSC::CodeProfiling::getOwnerUIDForPC): Deleted.
(JSC::CodeProfiling::begin): Deleted.
(JSC::CodeProfiling::end): Deleted.

  • tools/CodeProfiling.h:

(): Deleted.
(JSC::CodeProfiling::CodeProfiling): Deleted.
(JSC::CodeProfiling::~CodeProfiling): Deleted.
(JSC::CodeProfiling::enabled): Deleted.
(JSC::CodeProfiling::beVerbose): Deleted.
(JSC::CodeProfiling::beVeryVerbose): Deleted.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):

  • wasm/WasmCodeBlock.h:
  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmPlan.h:

Source/WTF:

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocatorTracker::notify):
(WTF::MetaAllocatorTracker::release):
(WTF::MetaAllocator::release):
(WTF::MetaAllocatorHandle::MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::shrink):
(WTF::MetaAllocator::MetaAllocator):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::currentStatistics):

  • wtf/MetaAllocator.h:

(WTF::MetaAllocatorTracker::find):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::currentStatistics):
(WTF::MetaAllocator::getLock): Deleted.

  • wtf/MetaAllocatorHandle.h:

(WTF::MetaAllocatorHandle::allocator):
(WTF::MetaAllocatorHandle::isManaged): Deleted.
(WTF::MetaAllocatorHandle::ownerUID): Deleted.

  • wtf/PlatformEnable.h:
  • wtf/RedBlackTree.h:
  • wtf/StdLibExtras.h:

(WTF::constructFixedSizeArrayWithArgumentsImpl):
(WTF::constructFixedSizeArrayWithArguments):

Tools:

  • Scripts/run-jsc-stress-tests:
  • TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WTF/RedBlackTree.cpp:

(TestWebKitAPI::TEST_F):

11:09 AM Changeset in webkit [259581] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Make RenderObject TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210035

Post-landing followup. More use of StringBuilder's variadic append. Have Node::debugDescription() include
its address, and have derived classes get the base class debugDescription(). Add an override in Text.

  • dom/Element.cpp:

(WebCore::Element::debugDescription const):

  • dom/Node.cpp:

(WebCore::Node::debugDescription const):

  • dom/Text.cpp:

(WebCore::Text::debugDescription const):
(WebCore::Text::formatForDebugger const):

  • dom/Text.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::debugDescription const):

11:08 AM Changeset in webkit [259580] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

CrashTracer: MobileSafari at WebKit: WebKit::SystemPreviewController::updateProgress
https://bugs.webkit.org/show_bug.cgi?id=210040
rdar://51410841

Reviewed by Darin Adler.

It appears that the SystemPreviewController on WebPageProxy can
become null causing a call to an in-progress download to crash
as it tries to talk to the QuickLook delegate. Guard against this
by checking the SystemPreviewController each time.

  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::systemPreviewController):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::processDidCrash):
(WebKit::DownloadClient::didFinish):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):

11:07 AM Changeset in webkit [259579] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

ProcessAssertion should use ASCIILiteral for its reason
https://bugs.webkit.org/show_bug.cgi?id=210049

Reviewed by Alex Christensen.

ProcessAssertion should use ASCIILiteral for its reason, instead of a String.

  • Shared/ios/DependencyProcessAssertionIOS.mm:

(WebKit::DependencyProcessAssertion::DependencyProcessAssertion):

  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):

10:47 AM Changeset in webkit [259578] by cathiechen
  • 3 edits
    2 adds in trunk

The change of zoom shouldn't affect ResizeObserverSize
https://bugs.webkit.org/show_bug.cgi?id=209947

Reviewed by Simon Fraser.

Source/WebCore:

Zoom in/out shouldn't affect ResizeObserverSize. Use adjustLayoutUnitForAbsoluteZoom instead.

Test: imported/w3c/web-platform-tests/resize-observer/resize-observer-with-zoom.html

  • page/ResizeObservation.cpp:

(WebCore::ResizeObservation::computeObservedSize const):

LayoutTests:

Add test for resizeObserver with zoom. The ResizeObserverSize shouldn't be effected by zooms.

  • resize-observer/resize-observer-with-zoom-expected.txt: Added.
  • resize-observer/resize-observer-with-zoom.html: Added.
10:41 AM Changeset in webkit [259577] by graouts@webkit.org
  • 13 edits in trunk

[Web Animations] Move Document.getAnimations() to DocumentOrShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=202192
<rdar://problem/55697775>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update the test relevant to DocumentOrShadowRoot.getAnimations() from upstream and record three new PASS results in it. We also get two new PASS from a harness test.

  • web-platform-tests/web-animations/idlharness.window-expected.txt:
  • web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt:
  • web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html:
  • web-platform-tests/web-animations/testcommon.js:

(async insertFrameAndAwaitLoad):

Source/WebCore:

We remove the getAnimations() declaration from the Document interface and instead move it on the DocumentOrShadowRoot interface.

We add the new method Document::matchingAnimations() which takes a lambda that is provided an animation's effect's target to determine whether
that animation should be found in the list of animations.

In the case of Document::getAnimations(), we filter out animations targeting elements hosted in shadow roots, while in ShadowRoot:getAnimations(),
we filter out animations targeting elements that are not hosted in the shadow root the method was called on.

  • dom/Document.cpp:

(WebCore::Document::getAnimations):
(WebCore::Document::matchingAnimations):

  • dom/Document.h:
  • dom/Document.idl:
  • dom/DocumentOrShadowRoot.idl:
  • dom/Element.cpp:

(WebCore::Element::getAnimations):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::getAnimations):

  • dom/ShadowRoot.h:
10:35 AM Changeset in webkit [259576] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Since ArrayBufferViewWatchpointAdaptor::add can fire watchpoints, DFG::Plan should check validity of CodeBlock after executing reallyAdd
https://bugs.webkit.org/show_bug.cgi?id=210055
<rdar://problem/61331962>

Reviewed by Keith Miller.

JSTests:

  • stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js: Added.

(xxx.foo):

Source/JavaScriptCore:

Since ArrayBufferViewWatchpointAdaptor::add can fire watchpoints, it is possible that the DFG CodeBlock is already invalidated after executing DFG::Plan::reallyAdd.
We should check CodeBlock's validity again and terminate DFG::Plan::finalizeWithoutNotifyingCallback with CompilationInvalidated if CodeBlock got invalidated.

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):

10:21 AM Changeset in webkit [259575] by Darin Adler
  • 72 edits
    5 deletes in trunk

Stop using live ranges in DocumentMarkerController
https://bugs.webkit.org/show_bug.cgi?id=209985

Reviewed by Antti Koivisto.

Source/WebCore:

  • Removed uses of live ranges from DocumentMarkerController.
  • Removed "active/inactive text match marker", which was only ever used by Chromium, and has been dead code in WebKit for while now.
  • Made a replacement for Range::absoluteTextQuads, in RenderObject, and moved all callers over.
  • Added a fast path for Node::isCharacterDataNode that makes it work without a virtual function call for the common node types.
  • Added a Node::length function that matches the DOM specification's definiton of a node's length, part of how ranges are defined.
  • Added a structure OffsetRange to represent start/end offsets within a single character data node. This is a common idiom to handle possible partial selection of text nodes at the start and end of the range when iterating text within a range.
  • Changed DocumentMarker functions to use OffsetRange.
  • Added helper functions for turning a vector of quads into a vector of bounding box rectangles, and for computing a union of all the rectangles, since both of these are common coding patterns.
  • Added an intersectingNodes function, producing a for-loop-compatible range for iterating all nodes covered by a DOM range.
  • Changed RenderObject::SetLayoutNeededForbiddenScope so it can be used without an #if at each call site, expands to nothing in release builds.
  • Eliminated uses of RetainPtr<id> instead of just id to pass arguments.
  • dom/CharacterData.h: Updated since isCharacterDataNode is no longer a

virtual function.

  • dom/Document.cpp:

(WebCore::Document::textInserted): Pass an OffsetRange to removeMarkers.
(WebCore::Document::textRemoved): Ditto.

  • dom/DocumentMarker.h: Removed most platform-specific functions.

Removed the active match boolean, which was only ever used for Chromium.
Use OffsetRange. Updated some obsolete comments.

  • dom/DocumentMarkerController.cpp: Removed include of "Range.h".

(WebCore::DocumentMarkerController::collectTextRanges): Change return value
to return a structure with a node and an offset range rather than using a
SimpleRange; adds clarity to the fact that it's guranteed to be only a
single node. May even want to consider some day moving TextIterator over
to this, but it's definitely better here for now.
(WebCore::DocumentMarkerController::addMarker): Updated for the change to
collectTextRanges and to DocumentMarker construction, and to use construction
syntax that doesn't repeat the DocumentMarker class name. Deleted overloads
that are no longer needed.
(WebCore::DocumentMarkerController::addMarkerToNode): Ditto.
(WebCore::DocumentMarkerController::addTextMatchMarker): Ditto.
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker): Deleted.
(WebCore::DocumentMarkerController::addDictationResultMarker): Deleted.
(WebCore::DocumentMarkerController::addDraggedContentMarker): Updated as above.
(WebCore::DocumentMarkerController::addPlatformTextCheckingMarker): Deleted.
(WebCore::DocumentMarkerController::copyMarkers): Fix a mistake where copying
markers would have a side effect of modifying the original.
(WebCore::DocumentMarkerController::removeMarkers): Just have this call
filterMarkers with null for the function.
(WebCore::DocumentMarkerController::filterMarkers): Updated for the change to
collectTextRanges and to pass a OffsetRange.
(WebCore::updateRenderedRectsForMarker): Use SimpleRange instead of a live
range. Use the new RenderObject::absoluteTextQuads and boundingBoxes functions
to make this clearer and simpler.
(WebCore::shouldInsertAsSeparateMarker): Update for changes to DocumentMarker.
(WebCore::DocumentMarkerController::copyMarkers): Take an OffsetRange instead
of a start and length. Also removed the unused "delta" argument since all
callers were passing 0.
(WebCore::DocumentMarkerController::removeMarkers): Removed unneeded
check if a key is still in the map.
(WebCore::DocumentMarkerController::forEach): Added. Shared logic for the multiple
functions that iterate the markers covered by a SimpleRange.
(WebCore::DocumentMarkerController::markersInRange): Call forEach.
(WebCore::DocumentMarkerController::repaintMarkers): Simplified loops.
(WebCore::DocumentMarkerController::setMarkersActive): Deleted. Was only
used for Chromium and has been dead code since.
(WebCore::DocumentMarkerController::hasMarkers): Call forEach.
(WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
Call forEach.

  • dom/DocumentMarkerController.h: Updated for the above.
  • dom/Element.cpp:

(WebCore::Element::boundsInRootViewSpace): Use unitedBoundingBoxes.
(WebCore::Element::absoluteEventBounds): Ditto.
(WebCore::Element::boundingAbsoluteRectWithoutLayout): Ditto.

  • dom/Node.h: Added inline fast path for isCharacterDataNode.

Moved some inline function bodies out of class definition so it's
easier to read it and get an overview.

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText const): Use boundingBoxes.
(WebCore::Range::absoluteTextQuads const): Deleted.
(WebCore::Range::borderAndTextRects const): Use boundingBoxes.

  • dom/Range.h: Deleted absoluteTextQuads.
  • dom/RenderedDocumentMarker.h: Use rvalue references and move.
  • dom/SimpleRange.cpp:

(WebCore::fastIsCharacterData): Deleted. Moved the optimizations into
Node::isCharacterDataNode so now all callers get them.
(WebCore::length): Deleted. Moved to Node::length.
(WebCore::makeBoundaryPointAfterNodeContents): Use Node::length.
(WebCore::IntersectingNodeRange::first const): Added.
(WebCore::IntersectingNodeRange::sentinel const): Added.
(WebCore::characterDataOffsetRange): Added.
(WebCore::IntersectingNodeIterator::operator++): Added.

  • dom/SimpleRange.h: Added intersectingNodes function, and the

IntersectingNodeRange and IntersectingNodeIterator classes used
to make it work. Added the OffsetRange structure and the
characterDataOffsetRange function, also to help with iteration.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
Take out unneeded holds_alternative check.
(WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
Removed unneeded assertion.
(WebCore::AlternativeTextController::dictationAlternativesForMarker):
Removed unneeded assertion.
(WebCore::AlternativeTextController::applyDictationAlternative):
Removed unneeded local variables.
(WebCore::AlternativeTextController::show): Pass reference to range
rather than pointer to rootViewRectForRange.
(WebCore::AlternativeTextController::timerFired): Ditto.
(WebCore::AlternativeTextController::rootViewRectForRange const):
Take a SimpleRange instead of a live range. Also use
RenderObject::absoluteTextQuads and unitedBoundingBoxes.

  • editing/AlternativeTextController.h: Updated for above.
  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
Removed most of the code since we can copy marker data without
separate code for each type. Also use SimpleRange instead of a live range.

  • editing/DictationCommand.cpp: Call addMarker instead of

addMarkerToNode.

  • editing/Editing.cpp:

(WebCore::visiblePositionForIndexUsingCharacterIterator): Use
SimpleRange instead of a live range.

  • editing/Editor.cpp:

(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
Removed a local variable.

  • editing/Editor.h: Remove use of RetainPtr<id> for arguments.
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::getTextRectangles const): Deleted.
(WebCore::FrameSelection::getClippedVisibleTextRectangles const):
Merged the logic from getTextRectangles in here, and changed to
use RenderObject::absoluteTextQuads and boundingBoxes.

  • editing/FrameSelection.h: Updated for above.
  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::doApply): Updated for changes to
the copyMarkers function.
(WebCore::SplitTextNodeCommand::doUnapply): Ditto.

  • editing/cocoa/DataDetection.mm:

(WebCore::detectItemAtPositionWithRange): Use
RenderObject::absoluteTextQuads and unitedBoundingBoxes.

  • editing/ios/DictationCommandIOS.cpp:

(WebCore::DictationCommandIOS::DictationCommandIOS): Remove use of
RetainPtr<id> for arguments.
(WebCore::DictationCommandIOS::create): Move from header.
(WebCore::DictationCommandIOS::doApply): Updated to do the work here
since we don't have addDictationPhraseWithAlternativesMarker any more.
Specifically, remove the first interpretation, which leaves behind a
vector of alternatives. Same for addDictationResultMarker.

  • editing/ios/DictationCommandIOS.h: Updated for the above.
  • editing/ios/EditorIOS.mm:

(WebCore::Editor::insertDictationPhrases): Take id instead of
RetainPtr<id>.
(WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed
around since we don't have addDictationPhraseWithAlternativesMarker
or addDictationResultMarker any more.

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents): Update for changes to
SetLayoutNeededForbiddenScope.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot const):
Get alternatives directly from DocumentMarker::data, now that
there is not a separate DocumentMarker::alternatives function.

  • page/mac/ServicesOverlayController.mm:

(WebCore::textQuadsToBoundingRectForRange): Deleted.
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
Use RenderObject::absoluteTextQuads, unitedBoundingBoxes,
and enclosingIntRect to do what textQuadsToBoundingRectForRange did.

  • platform/SerializedPlatformDataCueValue.h: Remove definition of

id since that's now done in RetainPtr.h.

  • platform/graphics/FloatQuad.cpp:

(WebCore::boundingBoxes): Added.
(WebCore::unitedBoundingBoxes): Added.

  • platform/graphics/FloatQuad.h: A couple tweaks, plus declared the

functions above.

  • platform/network/ResourceHandle.h: Remove definition of

id since that's now done in RetainPtr.h.

  • platform/network/cf/AuthenticationChallenge.h: Ditto.
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::resolveStyleForMarkedText): Take out
isActiveMatch logic that was used for Chromium only.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::minPreferredLogicalWidth const): Update for
changes to SetLayoutNeededForbiddenScope.
(WebCore::RenderBox::maxPreferredLogicalWidth const): Ditto.

  • rendering/RenderCounter.cpp:

(WebCore::RenderCounter::computePreferredLogicalWidths): Ditto.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintIntoLayer): Ditto.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
Changed to take a const& instead of a *.
(WebCore::RenderObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope):
Ditto.
(WebCore::RenderObject::markContainingBlocksForLayout): Update for
changes to SetLayoutNeededForbiddenScope.
(WebCore::RenderObject::absoluteBoundingBoxRect const): Use
unitedBoundingBoxes and enclosingIntRect.
(WebCore::RenderObject::absoluteBoundingBoxRectForRange): Use
the new RenderObject::absoluteTextQuads and unitedBoundingBoxes.
(WebCore::RenderObject::absoluteTextQuads): Added. Moved here from
Range::absoluteTextQuads, but refactored for simplicity and removed
the unused, and mildly complex to implement, feature that would
indicate whether some or all of the quads were from fixed positioning.

  • rendering/RenderObject.h: Tweaked comments. Moved multi-line function

bodies out of the RenderObject class definition to make it easier to
read. Declared a new absoluteTextQuads function. Made
m_setNeedsLayoutForbidden so setNeedsLayoutIsForbidden can be const.
Conditionalized isSetNeedsLayoutForbidden and SetLayoutNeededForbiddenScope
so both can be used in production builds but expand to no code.

  • rendering/RenderReplaced.cpp:

(WebCore::draggedContentContainsReplacedElement): Simplified and updated
now that the dragged content data no longer has its own named structure.
(WebCore::RenderReplaced::paint): Update for changes to
SetLayoutNeededForbiddenScope.

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight): Ditto.
(WebCore::RenderTableSection::layoutRows): Ditto.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::textSearchHighlightColor const): Removed the Chromium-only
concept of active vs. inactive text search highlight colors.
(WebCore::RenderTheme::platformTextSearchHighlightColor const): Ditto.
(WebCore::RenderTheme::activeTextSearchHighlightColor const): Deleted.
(WebCore::RenderTheme::inactiveTextSearchHighlightColor const): Deleted.
(WebCore::RenderTheme::platformActiveTextSearchHighlightColor const): Deleted.
(WebCore::RenderTheme::platformInactiveTextSearchHighlightColor const): Deleted.

  • rendering/RenderTheme.h: Ditto.
  • rendering/RenderThemeMac.h: Ditto.
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformTextSearchHighlightColor const): Ditto.
(WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Deleted.
(WebCore::RenderThemeMac::platformInactiveTextSearchHighlightColor const): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::addTextMatchMarker): Deleted. Was only used for a test
of Chromium-specific scroll tick marks.

  • testing/Internals.h: Deleted addTextMatchMarker.
  • testing/Internals.idl: Ditto.

Source/WebKit:

  • UIProcess/ViewSnapshotStore.h: Removed unused "Cocoa without IOSurface" code paths.
  • UIProcess/mac/ViewSnapshotStoreMac.mm:

(WebKit::ViewSnapshot::create): Ditto.
(WebKit::ViewSnapshot::ViewSnapshot): Ditto.
(WebKit::ViewSnapshot::setSurface): Ditto.
(WebKit::ViewSnapshot::hasImage const): Ditto.
(WebKit::ViewSnapshot::clearImage): Ditto.
(WebKit::ViewSnapshot::setVolatile): Ditto.
(WebKit::ViewSnapshot::asLayerContents): Ditto.
(WebKit::ViewSnapshot::asImageForTesting): Ditto.
(WebKit::ViewSnapshotStore::snapshottingContext): Deleted.

  • WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:

(WebKit::TextCheckingControllerProxy::replaceRelativeToSelection): Updated since
addPlatformTextCheckingMarker no longer exists.
(WebKit::TextCheckingControllerProxy::removeAnnotationRelativeToSelection):
Updated since filterMarkers passes a reference instead of a pointer now.
(WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions):
Simplified code a bit by removing local variables.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange): Use
RenderObject::absoluteTextQuads.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performImmediateActionHitTestAtLocation): Use
RenderObject::absoluteTextQuads and unitedBoundingBoxes.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame previousUnperturbedDictationResultBoundaryFromPosition:]):
Update since DocumentMarker::metadata no longer exists.
(-[WebFrame nextUnperturbedDictationResultBoundaryFromPosition:]):
Ditto.

  • WebCoreSupport/WebVisiblePosition.mm:

(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Update since DocumentMarker::alternatives no longer exists.
(-[WebVisiblePosition enclosingRangeWithCorrectionIndicator]):
Ditto.

Source/WebKitLegacy/mac:

  • DOM/DOM.mm:

(-[DOMNode absoluteQuadAndInsideFixedPosition:]): Use unitedBoundingBoxes.

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::handleRequestedCandidates): Use RenderObject::absoluteTextQuads.

  • WebView/WebFrame.mm:

(-[WebFrame getDictationResultRanges:andMetadatas:]): Updated since DocumentMarker no
longer has a dedicated metadata member function.
(-[WebFrame dictationResultMetadataForRange:]):

  • WebView/WebImmediateActionController.mm:

(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
Use RenderObject::absoluteTextQuads.

Source/WTF:

  • wtf/RetainPtr.h: Define "id" here when compiling non-ObjC so it's easier to use

RetainPtr<id> in any header file. Lets us stop doing this many other places.
Harmless when not needed.

Tools:

  • TestWebKitAPI/Tests/WebCore/MarkedText.cpp:

(TestWebKitAPI::TEST): Update for change to DocumentMarker constructor.

LayoutTests:

  • fast/scrolling/scrollbar-tickmarks-hittest-expected.txt: Removed.
  • fast/scrolling/scrollbar-tickmarks-hittest.html: Removed.
  • fast/scrolling/scrollbar-tickmarks-styled-expected.txt: Removed.
  • fast/scrolling/scrollbar-tickmarks-styled.html: Removed.
  • platform/gtk/fast/scrolling/scrollbar-tickmarks-styled-expected.png: Removed.
  • platform/ios/TestExpectations: Removed expectation for scrollbar-tickmarks.

These were Chromium-specific tests.

  • platform/mac-wk1/TestExpectations: Updated to expect flakiness instead of

repeatable failures for tests that passed locally.

  • platform/mac/TestExpectations: Ditto.
10:01 AM Changeset in webkit [259574] by Jonathan Bedard
  • 2 edits in trunk/Tools

run-api-tests spew "setup_environ_for_server" in verbose mode
https://bugs.webkit.org/show_bug.cgi?id=210012
<rdar://problem/61306056>

Reviewed by Aakash Jain.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.setup_environ_for_server): Do not log this function when called.

9:54 AM Changeset in webkit [259573] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add syscall to the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=210048

Reviewed by Brent Fulgham.

Add a required syscall to the WebContent sandbox on iOS and macOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
8:41 AM Changeset in webkit [259572] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Put ensureStillAliveHere for Integer TypedArrays in GetByVal
https://bugs.webkit.org/show_bug.cgi?id=210047

Reviewed by Mark Lam.

While r258381 puts ensureStillAliveHere in FTL to keep base alive for float/double TypedArrays,
we need to do the same thing for integer TypedArrays too. This patch places it.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):

8:33 AM Changeset in webkit [259571] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Remove instance fields and methods from StyleColor
https://bugs.webkit.org/show_bug.cgi?id=210045

Reviewed by Zalan Bujtas.

They are unused. The type itself remains as a namespace for static functions.
We might want bring it back later but there is no need to leave dead code around now.

  • css/StyleColor.h:

(WebCore::StyleColor::StyleColor): Deleted.
(WebCore::StyleColor::currentColor): Deleted.
(WebCore::StyleColor::isCurrentColor const): Deleted.
(WebCore::StyleColor::getColor const): Deleted.
(WebCore::StyleColor::resolve const): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

8:27 AM Changeset in webkit [259570] by Jacob Uphoff
  • 3 edits in trunk/LayoutTests

[ macOS debug ] REGRESSION (r259463): http/tests/media/clearkey/collect-webkit-media-session.html is failing
https://bugs.webkit.org/show_bug.cgi?id=209989

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
8:16 AM Changeset in webkit [259569] by graouts@webkit.org
  • 2 edits in trunk/Tools

[macOS] TestWebKitAPI.WKUserContentController.UserStyleSheetAffectingOnlySpecificWebViewSharedConfiguration is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=209934
<rdar://problem/61229832>

Reviewed by Antti Koivisto.

Fix a couple of tests which would use -[WKWebView _test_waitForDidFinishNavigation] in a way where the navigation may have finished before the method was called.

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

2:57 AM Changeset in webkit [259568] by youenn@apple.com
  • 16 edits
    1 copy
    1 add in trunk/Source

Add HEVC support in GPU Process for WebRTC
https://bugs.webkit.org/show_bug.cgi?id=209857

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h.
  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm: Added.

(-[WK_RTCLocalVideoH264H265Decoder initH264DecoderWithCallback:]):
(-[WK_RTCLocalVideoH264H265Decoder initH265DecoderWithCallback:]):
(-[WK_RTCLocalVideoH264H265Decoder decodeData:size:timeStamp:]):
(-[WK_RTCLocalVideoH264H265Decoder releaseDecoder]):
(webrtc::videoDecoderCallbacks):
(webrtc::setVideoDecoderCallbacks):
(webrtc::RemoteVideoDecoder::RemoteVideoDecoder):
(webrtc::RemoteVideoDecoder::decodeComplete):
(webrtc::RemoteVideoDecoder::InitDecode):
(webrtc::RemoteVideoDecoder::Decode):
(webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback):
(webrtc::RemoteVideoDecoder::Release):
(webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory):
(webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const):
(webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder):
(webrtc::createWebKitDecoderFactory):
(webrtc::createLocalH264Decoder):
(webrtc::createLocalH265Decoder):
(webrtc::releaseLocalDecoder):
(webrtc::decodeFrame):

  • Source/webrtc/sdk/WebKit/WebKitEncoder.mm:

(-[WK_RTCLocalVideoH264H265Encoder initWithCodecInfo:]):
(-[WK_RTCLocalVideoH264H265Encoder setCallback:]):
(-[WK_RTCLocalVideoH264H265Encoder releaseEncoder]):
(-[WK_RTCLocalVideoH264H265Encoder startEncodeWithSettings:numberOfCores:]):
(-[WK_RTCLocalVideoH264H265Encoder encode:codecSpecificInfo:frameTypes:]):
(-[WK_RTCLocalVideoH264H265Encoder setBitrate:framerate:]):
(webrtc::createLocalEncoder):
(webrtc::releaseLocalEncoder):
(webrtc::initializeLocalEncoder):
(webrtc::encodeLocalEncoderFrame):
(webrtc::setLocalEncoderRates):

  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:

(): Deleted.

  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::videoDecoderCallbacks): Deleted.
(webrtc::setVideoDecoderCallbacks): Deleted.
(webrtc::RemoteVideoDecoder::RemoteVideoDecoder): Deleted.
(webrtc::RemoteVideoDecoder::decodeComplete): Deleted.
(webrtc::RemoteVideoDecoder::InitDecode): Deleted.
(webrtc::RemoteVideoDecoder::Decode): Deleted.
(webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
(webrtc::RemoteVideoDecoder::Release): Deleted.
(webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory): Deleted.
(webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const): Deleted.
(webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder): Deleted.
(webrtc::createWebKitDecoderFactory): Deleted.
(webrtc::createLocalDecoder): Deleted.
(webrtc::releaseLocalDecoder): Deleted.
(webrtc::decodeFrame): Deleted.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:

(-[RTCVideoDecoderH265 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderH265 decodeData:size:timeStamp:]):

  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
(WebKit::LibWebRTCCodecsProxy::createEncoder):
(WebKit::LibWebRTCCodecsProxy::createDecoder): Deleted.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::createVideoDecoder):
(WebKit::createVideoEncoder):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::formatNameFromCodecType):
(WebKit::LibWebRTCCodecs::createEncoder):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
1:03 AM Changeset in webkit [259567] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

CanvasRenderingContext2D.drawImage should ignore the EXIF orientation if the image-orientation is none
https://bugs.webkit.org/show_bug.cgi?id=209849

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-04-06
Reviewed by Darin Adler.

Source/WebCore:

drawImage() will get the image-orientation of the HTMLImageElement from
its computed style. This will be passed to GraphicsContext::drawImage()
in the ImagePaintingOptions. Previously we were passing FromImage always.

Test: fast/images/image-orientation-none-canvas.html

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

  • html/canvas/CanvasRenderingContext2DBase.h:

LayoutTests:

  • fast/images/image-orientation-none-canvas-expected.html: Added.
  • fast/images/image-orientation-none-canvas.html: Added.

Apr 5, 2020:

11:04 PM Changeset in webkit [259566] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove code that has no effect from loadURL
https://bugs.webkit.org/show_bug.cgi?id=210029

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-05
Reviewed by Darin Adler.

Remove setDomainForCachePartition from loadURL since it will be
overwritten in DocumentLoader::loadMainResource, this was
introduced by r213126.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

11:02 PM Changeset in webkit [259565] by Ross Kirsling
  • 4 edits in trunk

DLLLauncherMain print to console instead of opening window on fatal error
https://bugs.webkit.org/show_bug.cgi?id=206537

Reviewed by Fujii Hironori.

Source/JavaScriptCore:

  • shell/DLLLauncherMain.cpp:

(fatalError):

Tools:

  • win/DLLLauncher/DLLLauncherMain.cpp:

(fatalError):

9:34 PM Changeset in webkit [259564] by Ross Kirsling
  • 5 edits
    1 add in trunk

JSC shell shouldn't treat NUL as a terminator when printing a JS string
https://bugs.webkit.org/show_bug.cgi?id=210037

Reviewed by Darin Adler.

JSTests:

  • .gitattributes:
  • ChakraCore.yaml:
  • ChakraCore/test/es5/hasItem.baseline-jsc: Added.

Update baseline and mark it diffable (as plaintext) in spite of containing \0.

Source/JavaScriptCore:

Since JS strings aren't null-terminated, it's probably a better experience to not stop printing when we see \0.
That is, 'abc\0def' should be printed as abcdef and not abc.

This patch updates our printing of evaluation results as well as the print / printErr / debug functions.

  • jsc.cpp:

(printInternal):
(functionDebug):
(runInteractive):

9:22 PM Changeset in webkit [259563] by don.olmstead@sony.com
  • 6 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=206894

Reviewed by Adrian Perez de Castro.

.:

Add a MiniBrowser derived sources directory.

  • Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake ports to use WEBKIT_EXECUTABLE when creating their respective
MiniBrowsers.

  • MiniBrowser/gtk/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • MiniBrowser/wpe/CMakeLists.txt:
9:14 PM Changeset in webkit [259562] by Manuel Rego Casasnovas
  • 11 edits
    2 adds in trunk

Computed style for "outline-offset" is wrong when "outline-style" is "none"
https://bugs.webkit.org/show_bug.cgi?id=209913

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Imported css/css-ui/parsing/outline-offset-computed.html from WPT.
And update baselines for web-animations tests.

  • web-platform-tests/css/css-ui/parsing/outline-offset-computed-expected.txt: Added.
  • web-platform-tests/css/css-ui/parsing/outline-offset-computed.html: Added.
  • web-platform-tests/css/css-ui/parsing/w3c-import.log:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:

Computed style for outline-offset was not returning the proper value
if "outline-style" was "none".
This was due to a check in RenderStyle::outlineOffset()
that this patch removes.

This code could be there because this is needed for "outline-width"
as specified in the spec (https://drafts.csswg.org/css-ui/#outline-props),
however there's nothing about this on the "outline-offset" property.

Test: imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::outlineOffset const):

LayoutTests:

Update baselines for web-animations tests.

  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
9:02 PM Changeset in webkit [259561] by Peng Liu
  • 4 edits in trunk/Source/WebCore

The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Darin Adler.

We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
"#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".

Source/WebCore:

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVKitSPI.h:
8:02 PM Changeset in webkit [259560] by don.olmstead@sony.com
  • 16 edits
    1 copy in trunk

[CMake] Add WebKit::WebKit target
https://bugs.webkit.org/show_bug.cgi?id=210033

Reviewed by Fujii Hironori.

.:

Use SET_AND_EXPOSE_TO_BUILD for the Plugin process since ENABLE(PLUGIN_PROCESS)
is used in the source code.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit:

Use WEBKIT_EXECUTABLE macros for the Process executables. Rename the output
file names to fit with the macro's expectations.

Add Headers.cmake which lists out all the public headers that are currently
shared by the PlayStation and Windows ports. This is then included on each
platform that is using it. Additionally use WEBKIT_COPY_FILES to create a
target which copies headers.

Finally use WEBKIT_FRAMEWORK_TARGET to create a WebKit target. Its dependent
on the WebKit library itself, the processes being built, and any headers that
are copied. This ensures that everything is built for dependent targets.

  • CMakeLists.txt:
  • Headers.cmake: Copied from Source/WebKit/PlatformPlayStation.cmake.
  • PlatformFTW.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWPE.cmake:
  • PlatformWin.cmake:

Tools:

Use the WebKit::WebKit target for MiniBrowser and TestWebKit. This removes
the need to have WebProcess and NetworkProcess as dependencies since they are
attached to the WebKit::WebKit target.

Remove references to WebKitFrameworkHeaders as it is now WebKit_CopyHeaders.
It is also a dependency of WebKit::WebKit so it does not need to be listed
as a dependency.

  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformPlayStation.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • WebKitTestRunner/CMakeLists.txt:
5:28 PM Changeset in webkit [259559] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

Address review comments after r259550
https://bugs.webkit.org/show_bug.cgi?id=208472

Reviewed by Darin Adler.

  • platform/ios/ValidationBubbleIOS.mm:

Change a few named constants to be constexpr instead, and add comments describing their purpose.

(label):
(updateLabelFrame):

Rename these helper functions and move them up the file. Turn what was previously named
WebValidationBubbleViewController_labelFrame into updateLabelFrame, and have it additionally update the
view controller's label's frame to avoid repeating this logic in the subclassed method implementations below.

(callSuper):
(WebValidationBubbleViewController_viewDidLoad):
(WebValidationBubbleViewController_viewWillLayoutSubviews):
(WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
(allocWebValidationBubbleViewControllerInstance):

Instead of using -valueForKey, use objc_getAssociatedObject and objc_setAssociatedObject, with
OBJC_ASSOCIATION_RETAIN_NONATOMIC.

(WebCore::ValidationBubble::ValidationBubble):
(invokeUIViewControllerSelector): Deleted.
(WebValidationBubbleViewController_dealloc): Deleted.

Remove the -dealloc override. We don't need this anymore, since we're now using associated objects with
OBJC_ASSOCIATION_RETAIN_NONATOMIC to hold on to and keep track of our label.

(WebValidationBubbleViewController_labelFrame): Deleted.
(WebValidationBubbleViewController_label): Deleted.

4:25 PM Changeset in webkit [259558] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Putting "memory" back to ensureStillAliveHere
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Keith Miller.

We put "memory" back to make ensureStillAliveHere compiler-barrier.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

  • runtime/JSCJSValue.h:

(JSC::ensureStillAliveHere):

4:23 PM Changeset in webkit [259557] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Make RenderObject TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210035

Reviewed by Zalan Bujtas.

Add operator<<(TextStream, const RenderObject&) and add virtual debugDescription() functions on
Node and RenderObject which should eventually replace the awkward formatForDebugger(char* buffer, unsigned length).

Convert RenderLayer to use renderer's debug description.

  • dom/Element.cpp:

(WebCore::Element::debugDescription const):

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

(WebCore::Node::debugDescription const):
(WebCore::operator<<):

  • dom/Node.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::name const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::debugDescription const):
(WebCore::operator<<):

  • rendering/RenderObject.h:
3:59 PM Changeset in webkit [259556] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ARM64 moveConditionallyDouble() for DoubleNotEqualAndOrdered is wrong.
https://bugs.webkit.org/show_bug.cgi?id=210039
<rdar://problem/61321778>

Reviewed by Yusuke Suzuki.

For the scenario where the dest register is same as the then case register, there
is one csel instruction that should be checking the overflow condition to test
for unordered operands. Instead, we were testing for the not equal condition.
This patch fixes it to check for the overflow condition.

This bug was caught by testmasm.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):

3:01 PM Changeset in webkit [259555] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Sort JavaScriptCore Xcode project file

file to try to force buildbots to rebuild and resign
JavaScriptCore.framework. Some bots are stuck with a codesign
error after r259545.

11:23 AM Changeset in webkit [259554] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

ensureStillAliveHere can take the value in any location
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Mark Lam.

It shouldn't matter if the value is on the stack or in a register
because we're not going to do anything with it. Also, there's no
reason to clobber memory.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

11:21 AM Changeset in webkit [259553] by zandobersek@gmail.com
  • 9 edits in trunk/Source

Unreviewed, adding missing header inclusions to get
non-unified build building.

Source/JavaScriptCore:

  • heap/HeapSnapshotBuilder.h:
  • tools/Integrity.h:

Source/WebCore:

  • html/HTMLCanvasElement.cpp:
  • loader/ResourceLoadNotifier.h:
  • workers/service/ServiceWorkerProvider.h:

Source/WebKit:

  • Shared/UserContentControllerParameters.cpp:
11:11 AM Changeset in webkit [259552] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Change s_entropyBitsShiftForStructurePointer to 48 bits.
https://bugs.webkit.org/show_bug.cgi?id=210022
<rdar://problem/61310696>

Reviewed by Keith Miller.

This is ok because the top 16 bits of the 64-bit address is not used. We can
fill out the top 16-bits of the encodedStructureBits with the lowest 16-bits of
the StructureID (which includes the 7-bits of entropy).

  • runtime/StructureIDTable.h:
9:49 AM Changeset in webkit [259551] by dbates@webkit.org
  • 4 edits in trunk/Tools

RequestTextInputContext.Simple iframe sub-tests may sometimes fail
https://bugs.webkit.org/show_bug.cgi?id=210010
<rdar://problem/61303697>

Reviewed by Simon Fraser and Darin Adler.

Make the iframe sub tests wait until the DOM Load event has fired in the main frame.
When it fires this means that all immediate child frames (like the one added by these
sub tests) have fired their DOM Load event. This ensures deterministic results.

Also while I am here, extract out the iframe sub-tests into their own TEST() method
for testing and debugging convenience. I also fixed up -performAfterLoading so that
it wouldn't leak the user script string and made it work if called more than once in the
same TEST() by caching this script and only adding it to the user content controller
once. Moreover, removed duplication by writing it in terms of -performAfterReceivingMessage.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TEST):
(webViewLoadHTMLStringAndWaitForDOMLoadEvent): Helper function to load an HTML string
into a web view and wait until a DOM Load event is fired at the main frame.

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView performAfterLoading:]): Modernized and simplified. Modified user script
to use addEventListener() instead of onload as the latter overrides any existing load handler.
This user script is also added only to the main frame since all existing callers just
want to know that all main frame and immediate child frames loaded. Also listen for the load
event during the capture phase, which is a tiny bit faster to receive, instead of the bubbling
phase. See second paragraph above for more details on the changes I made to this function.

9:34 AM Changeset in webkit [259550] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebCore

[iOS] Ugly and misaligned form validation bubble
https://bugs.webkit.org/show_bug.cgi?id=208472
<rdar://problem/59984027>

Reviewed by Tim Horton.

In iOS 13, the view of a UIViewController that is presented as a popover encompasses the arrow (connected to
the popover) that points to the target rect. This means that our current logic for laying out the inner text
label of a form validation bubble on iOS no longer works, since it sets a frame that is offset vertically and
horizontally from the bounds of the view controller's view.

To fix this, we need to respect the safe area insets of the view controller's view when laying out the label.
The idiomatic way to do this is to subclass -viewSafeAreaInsetsDidChange and -viewWillLayoutSubviews on the view
controller, and update the subview's (i.e. label's) frame; unfortunately, since ValidationBubble is implemented
in WebCore, we can't explicitly link against UIKit, so we need to dynamically create a UIViewController subclass
and override these subclassing hooks to get our desired behavior.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(invokeUIViewControllerSelector):
(WebValidationBubbleViewController_dealloc):
(WebValidationBubbleViewController_viewDidLoad):
(WebValidationBubbleViewController_viewWillLayoutSubviews):
(WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
(WebValidationBubbleViewController_labelFrame):
(WebValidationBubbleViewController_label):
(allocWebValidationBubbleViewControllerInstance):

Subclass and create a custom UIViewController to ensure that the label is vertically centered in its popover.
See above for more details.

(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::show):

Minor style fixes: remove extraneous .get()s on RetainPtr, and use property syntax when possible.

(WebCore::ValidationBubble::setAnchorRect):

Additionally remove a line of code that currently forces the form validation popover to present below its target
rect (and therefore have an arrow pointing up). It wasn't apparent why this logic was added in r208361, but it
seems the intention wasn't to restrict the popover to presenting below the target.

This allows the form validation popover to show up in the case where the input element is aligned to the very
bottom of the web view, such that there isn't enough space below the field to show the validation bubble.

1:59 AM Changeset in webkit [259549] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] JSArrayIterator's size is wrong
https://bugs.webkit.org/show_bug.cgi?id=210020

Reviewed by Mark Lam.

Internal-size of JSArrayIterator should be 3, not 4.

  • runtime/JSArrayIterator.h:
1:41 AM Changeset in webkit [259548] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Rolling out r259545: causing CodeSigning error in jsc EWS bot.
https://bugs.webkit.org/show_bug.cgi?id=210018

Not reviewed.

1:34 AM Changeset in webkit [259547] by mark.lam@apple.com
  • 24 edits
    2 adds in trunk/Source/JavaScriptCore

Add some structureID integrity checks to various runtime functions.
https://bugs.webkit.org/show_bug.cgi?id=210015
<rdar://problem/58116514>

Reviewed by Keith Miller.

Specifically, implementations of toString(), toValue(), and a few others.
I also moved the HeapCell version of ensureStillAliveHere() into the new
EnsureStillAliveHere.h/cpp since it's useful for any pointers, not just HeapCells.

This change is performance neutral on JetStream 2.0, Speedometer-2, and PLT5.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/HeapCell.cpp:

(JSC::ensureStillAliveHere): Deleted.

  • heap/HeapCell.h:

(JSC::ensureStillAliveHere): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):

  • runtime/BigIntPrototype.cpp:

(JSC::bigIntProtoFuncToStringImpl):
(JSC::bigIntProtoFuncValueOf):

  • runtime/BooleanPrototype.cpp:

(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate):
(JSC::formateDateInstance):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToPrimitiveSymbol):

  • runtime/EnsureStillAliveHere.cpp: Added.

(JSC::ensureStillAliveHere):

  • runtime/EnsureStillAliveHere.h: Added.

(JSC::ensureStillAliveHere):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorPrototype.cpp:

(JSC::errorProtoFuncToString):

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString):

  • runtime/JSCell.cpp:

(JSC::JSCell::toObjectSlow const):

  • runtime/NumberPrototype.cpp:

(JSC::toThisNumber):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncToString):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncToString):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncToString):

  • runtime/StructureIDTable.h:

(JSC::StructureIDTable::validate):
(JSC::StructureIDTable::isValid): Deleted.

  • runtime/SymbolPrototype.cpp:

(JSC::symbolProtoGetterDescription):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):

  • tools/Integrity.h:
  • tools/IntegrityInlines.h:

(JSC::Integrity::auditStructureID):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:

(JSC::getGlobal):

1:12 AM Changeset in webkit [259546] by Alexey Shvayka
  • 10 edits in trunk

Octal escapes should be max 3 digits and syntax errors in Unicode patterns
https://bugs.webkit.org/show_bug.cgi?id=167067

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This patch:

a) Adds SyntaxError for octal escapes in Unicode patterns, while preserving /\0/u
being parsed as null character escape. Grammar: https://tc39.es/ecma262/#prod-CharacterEscape

b) Limits consumeOctal() to 3 digits only, preventing it from consuming leading zeros.
Grammar: https://tc39.es/ecma262/#prod-annexB-LegacyOctalEscapeSequence

Both changes align JSC with V8 and SpiderMonkey.

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):
(JSC::Yarr::errorToThrow):

  • yarr/YarrErrorCode.h:
  • yarr/YarrParser.h:

(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::consumeOctal):

LayoutTests:

  • fast/regex/script-tests/pcre-test-1.js:
  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:

Apr 4, 2020:

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

copy jsc CLI into JavaScriptCore.framework earlier
https://bugs.webkit.org/show_bug.cgi?id=210018

Reviewed by Mark Lam.

Some of our test scripts only copy the JavaScriptCore.framework
into the test directory and try to run jsc from there. We should
copy the jsc CLI ASAP so we don't need to build all the other test
binaries unless we actually need them.

10:09 PM Changeset in webkit [259544] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove LockHistory parameter from loadWithNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=210007

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-04
Reviewed by Darin Adler.

Remove LockHistory parameter from loadWithNavigationAction since NavigationAction
has a member for this. Where needed explicitly set the LockHistory on the actions.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/FrameLoader.h:
9:16 PM Changeset in webkit [259543] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix v2: HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
https://bugs.webkit.org/show_bug.cgi?id=209925

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::elementFromPastNamesMap const):
(WebCore::HTMLFormElement::addToPastNamesMap):

  • Apply macros consistently. Regressed in r259513 and was not fixed by r259527.
8:44 PM Changeset in webkit [259542] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GTK] Update test baseline after r259438 and garden crashes

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/accessibility/menu-list-sends-change-notification-expected.txt:
5:42 PM Changeset in webkit [259541] by wenson_hsieh@apple.com
  • 7 edits in trunk

Add a fourth round of logging to help diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=210011

Reviewed by Darin Adler.

Source/WebCore:

Augment logging in WebItemProviderPasteboard to additionally dump a backtrace when registering item providers
when initiating a drag on iOS. Logging thus far suggests that this is due to an IPC dispatch race when sending
the following messages to the UI process: WebPasteboardProxy::writeCustomData and
WebPasteboardProxy::writeStringToPasteboard. While writeCustomData is dispatched synchronously,
writeStringToPasteboard is dispatched asynchronously; this means that it is possible for the call to
writeCustomData to be dispatched before writeStringToPasteboard even if the web process sends the
writeCustomData message later, due to the UI-process-side mechanism for immediately dispatching incoming sync
IPC if it is currently processing sync IPC itself.

A backtrace here should help to confirm this theory.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Source/WebKit:

Remove all logging previously added to WKContentView and DragDropInteractionState.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::clearStagedDragSource):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleDragStartRequest:]):

Tools:

Remove all logging previously added to DragAndDropSimulator.

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):

5:03 PM Changeset in webkit [259540] by Chris Dumez
  • 20 edits in trunk

[iOS] Simplify ProcessAssertion class in preparation for switch to RunningBoard
https://bugs.webkit.org/show_bug.cgi?id=209984
<rdar://problem/61273941>

Reviewed by Darin Adler.

Source/WebKit:

Simplify ProcessAssertion class in preparation for switch to RunningBoard. There
is a slight mismatch between the way BKS and RunningBoard process assertion API.
This refactoring makes it so that we can use the same ProcessAssertion class in
WebKit to work with either BKS or RunningBoard. Support for RunningBoard will
come later.

In particular, the following changes were made:

  • Replace AssertionState & AssertionReason enums with a single ProcessAssertionType one since RunningBoard does not have 2 separate concepts.
  • Drop ProcessAssertion::setState() since it is not possible to change the flags on an existing RunningBoard assertion. Instead, we are expected to create a brand new process assertion of the expected type.
  • NetworkProcess/Downloads/DownloadMap.cpp:

(WebKit::DownloadMap::add):

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _setAssertionTypeForTesting:]):
(-[WKWebView _setAssertionStateForTesting:]): Deleted.

  • UIProcess/Downloads/DownloadProxyMap.cpp:

(WebKit::DownloadProxyMap::createDownloadProxy):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendProcessDidResume):
(WebKit::NetworkProcessProxy::takeUploadAssertion):
(WebKit::NetworkProcessProxy::didSetAssertionState): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState): Deleted.

  • UIProcess/ProcessAssertion.h:

(WebKit::ProcessAssertion::type const):
(WebKit::ProcessAssertion::state const): Deleted.

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::expectedAssertionType):
(WebKit::ProcessThrottler::updateAssertionTypeNow):
(WebKit::ProcessThrottler::setAssertionType):
(WebKit::ProcessThrottler::updateAssertionIfNeeded):
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::prepareToSuspendTimeoutTimerFired):
(WebKit::ProcessThrottler::processReadyToSuspend):
(WebKit::ProcessThrottler::sendPrepareToSuspendIPC):
(WebKit::ProcessThrottler::expectedAssertionState): Deleted.
(WebKit::ProcessThrottler::updateAssertionStateNow): Deleted.
(WebKit::ProcessThrottler::setAssertionState): Deleted.

  • UIProcess/ProcessThrottler.h:
  • UIProcess/ProcessThrottlerClient.h:

(WebKit::ProcessThrottlerClient::didSetAssertionType):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setWebProcessHasUploads):
(WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didSetAssertionType):
(WebKit::WebProcessProxy::didSetAssertionState): Deleted.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::setAssertionTypeForTesting):
(WebKit::WebProcessProxy::setAssertionStateForTesting): Deleted.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::flagsForAssertionType):
(WebKit::toBKSProcessAssertionReason):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
(WebKit::flagsForState): Deleted.
(WebKit::reasonForState): Deleted.
(WebKit::ProcessAssertion::setState): Deleted.
(WebKit::ProcessAndUIAssertion::setState): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4:44 PM Changeset in webkit [259539] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

[GPUP] Remove unnecessary RemoteCDMInstanceSessionIdentifier argument from RemoteCDMFactory::addSession()
<https://webkit.org/b/210006>

Reviewed by Darin Adler.

  • WebProcess/GPU/media/RemoteCDMFactory.cpp:

(WebKit::RemoteCDMFactory::addSession):

  • Remove argument. Use session parameter to retrieve the ID.
  • WebProcess/GPU/media/RemoteCDMFactory.h:

(WebKit::RemoteCDMFactory::addSession):

  • Remove argument.
  • WebProcess/GPU/media/RemoteCDMInstance.cpp:

(WebKit::RemoteCDMInstance::createSession):

  • Remove argument.
3:39 PM Changeset in webkit [259538] by Doug Kelly
  • 2 edits in trunk/Source/WebCore

Additional sanity checks in compareAnimationsByCompositeOrder()
https://bugs.webkit.org/show_bug.cgi?id=209996

Reviewed by Geoffrey Garen.

compareAnimationsByCompositeOrder() is used by std::sort() which requires strict weak ordering.
This adds additional checks to ensure strict weak ordering is maintained, first by ensuring
the transitionProperty string is different before returning that comparison, then by only using
if the animation is a CSSTransition or CSSAnimation if the left hand and right hand sides differ.
This should leave all remaining cases to sort by the global animation list.

No new tests; this should be covered by existing tests and should not change functionality
otherwise.

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareAnimationsByCompositeOrder):

2:42 PM Changeset in webkit [259537] by Fujii Hironori
  • 3 edits in trunk/Source/WTF

[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in WTF
https://bugs.webkit.org/show_bug.cgi?id=209955

Reviewed by Darin Adler.

Clang 10 reports a compilation warning for int to float
conversions losing the precision. The warning is often reported
for code converting a floating point value to an integer value.
For example:

Optional<int> positive_float_to_int(float f) {

if (f > INT_MAX)

return nullopt;

return static_cast<int>(f);

}

INT_MAX is implicitly converted float, but float can't keep the
precision of such large value. And, C++ spec doesn't specify
whether it would be rounded up or down. Above code should be
rewritten to:

Optional<int> positive_float_to_int(float f) {

if (f >= pow(2, 31))

return nullopt;

return static_cast<int>(f);

}

Instead of using pow, this change added a template variable
maxPlusOne<T>.

  • wtf/MathExtras.h:

(powerOfTwo): Added.
(doubleToInteger): Added.
(maxPlusOne): Added.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):

12:36 PM Changeset in webkit [259536] by Alexey Shvayka
  • 10 edits in trunk

'\u' should throw an early SyntaxError exception, but instead evaluates to 'u'
https://bugs.webkit.org/show_bug.cgi?id=198790

Reviewed by Yusuke Suzuki.

JSTests:

  • mozilla/ecma/Array/15.4.5.1-1.js:
  • mozilla/ecma/LexicalConventions/7.7.4.js:
  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This change removes special-case for '\u', invoking parseUnicodeEscape() right away,
aligning string literals with ES6 template literals. parseComplexEscape() method
signature is greatly simplified, JSC is aligned with V8 and SpiderMonkey.

Grammar: https://tc39.es/ecma262/#prod-UnicodeEscapeSequence
(Hex4Digits or '{' is required, otherwise parsing fails)

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseComplexEscape):
(JSC::Lexer<T>::parseStringSlowCase):
(JSC::Lexer<T>::parseTemplateLiteral):

  • parser/Lexer.h:

LayoutTests:

  • js/script-tests/unicode-escape-sequences.js:
  • js/unicode-escape-sequences-expected.txt:
11:56 AM Changeset in webkit [259535] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, skip stress/typed-array-subarray-can-throw-oom-error.js on memory-limited archs, and mark it slow
https://bugs.webkit.org/show_bug.cgi?id=209974

  • stress/typed-array-subarray-can-throw-oom-error.js:
11:52 AM Changeset in webkit [259534] by wenson_hsieh@apple.com
  • 7 edits in trunk

Add even more logging to try and diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=210008

Reviewed by Tim Horton.

Source/WebCore:

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Source/WebKit:

Revert all (except one) of the logging statements added in r259518, and add several new ones. This last logging
pass demonstrated that DragController had failed to start a drag, since -[WKContentView _didHandleDragStartRequest:]
receives word that the drag has started, yet there are no staged drag items.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::clearStagedDragSource):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:canHandleSession:]):
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidExit:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):

Tools:

Replace old logging with new logging (in different places).

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):

Rule out the possibility that the WebKit client (in this case, the drag and drop simulator) is overriding the
list of drag items by logging the given NSItemProvider that will be used to start the drag.

11:38 AM Changeset in webkit [259533] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Ahom text is busted
https://bugs.webkit.org/show_bug.cgi?id=209898
<rdar://problem/60571257>

Reviewed by Tim Horton.

https://en.wikipedia.org/wiki/Ahom_language

The Ahom language, U+11700 - U+1173F, requires the complex text codepath.
This patch also makes some languages adjacent in codepoint-space (Dogra,
Dives Akuru, Nandinagari, Zanabazar Square, Soyombo, Warang Citi, and
Pau Cin Hau) use the complex path too.

At some point, we really need to make the fast text codepath opt-in instead
of opt-out. This patch is a simple band-aid fix until we can do that.

No new tests because I can't find an appropriately licenced font.
There is Noto Serif Ahom, but that's licenced under SIL OFL, and I'm
not sure if that's an acceptable license to be committed to WebKit.
https://github.com/googlefonts/noto-fonts/tree/master/hinted/NotoSerifAhom

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

11:16 AM Changeset in webkit [259532] by Antti Koivisto
  • 20 edits
    1 copy
    8 deletes in trunk

Implement the css-color-4 behavior for inheritance of currentColor
https://bugs.webkit.org/show_bug.cgi?id=193171
<rdar://problem/47287516>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text-decor/parsing/text-decoration-color-computed-expected.txt:
  • web-platform-tests/css/css-transitions/currentcolor-animation-001-expected.txt:
  • web-platform-tests/svg/pservers/scripted/stop-color-inheritance-currentcolor-expected.txt:

Source/WebCore:

In CSS3/4 'currentcolor' inherits as 'currentcolor' instead of as a resolved color value.

Value 'currentcolor' is represented in RenderStyle as invalid Color object. This has been true
even before the explicit property value for it was added. Fallback to 'color' has always been
the default behavior of most color properties.

As a result the correct behavior falls pretty easily from WebKit code. It essentially amounts to allowing
color properties to inherit normally even when they are invalid/currentcolor.

In future we might want to wrap RenderStyle color values into a type that makes 'currentcolor' more explicit.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::gradientWithStylesResolved):

  • css/CSSProperties.json:
  • Remove 'no-default-color' which triggered to old inheritance behavior.
  • Rename initial value invalidColor to currentColor for clarity.
  • css/makeprop.pl:

Code for 'no-default-color' generation is not needed anymore.

(generateInheritValueSetter):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::colorIncludingFallback const):

Resolve 'background-color' like the rest so setting it to 'currentcolor' works correctly.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::currentColor):
(WebCore::RenderStyle::invalidColor): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::createFilterOperations):
(WebCore::Style::BuilderState::colorFromPrimitiveValue const):

Don't resolve 'currentcolor', instead return it as a value.

(WebCore::Style::BuilderState::colorFromPrimitiveValueWithResolvedCurrentColor const):

Helper for a few cases where we still resolve current color during style building time. It is
used for filters and generated images.

  • style/StyleBuilderState.h:
  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):

Resolve 'currentcolor' during use time for svg color stops.

LayoutTests:

  • TestExpectations:
  • fast/borders/border-color-inherit-expected.html: Copied from LayoutTests/fast/borders/border-color-inherit.html.
  • fast/borders/border-color-inherit.html:

Fix for the new behavior and make it a reftest.

  • fast/css/webkit-text-fill-color-inherit.html:
  • platform/gtk/fast/borders/border-color-inherit-expected.png: Removed.
  • platform/gtk/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/ios/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/mac/fast/borders/border-color-inherit-expected.png: Removed.
  • platform/mac/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/win/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/wincairo/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/wpe/fast/borders/border-color-inherit-expected.txt: Removed.
10:06 AM Changeset in webkit [259531] by Peng Liu
  • 10 edits
    2 adds in trunk

REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
https://bugs.webkit.org/show_bug.cgi?id=209680

Reviewed by Jer Noble.

Source/WebCore:

API test: WebKitLegacy.PreemptVideoFullscreen

Call fullscreenModeChanged(VideoFullscreenModeNone) right before calling the
functions of ChromeClient to make sure the state (m_videoFullscreenMode)
has the expected value when some callbacks come back to the video element.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::dispatchEvent):
(WebCore::HTMLMediaElement::exitFullscreen):

Add null pointer checkings to fix two crashes found in stress tests.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::requestVideoContentLayer):
(VideoFullscreenControllerContext::returnVideoContentLayer):

Source/WebKitLegacy/mac:

With this patch, the WebKit-Legacy can support multiple video elements request
to enter video fullscreen almost at the same time, and only the last one will succeed.
Also, this patch fixes webkit.org/b/209610 for WebKit-Legacy.

  • WebView/WebView.mm:
  • WebView/WebViewData.h:

Tools:

Add an API test for the video fullscreen support of WebKitLegacy on iOS.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm: Added.

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

  • TestWebKitAPI/Tests/WebKitLegacy/ios/two-videos.html: Added.

LayoutTests:

Remove the crashing expectation for media/media-fullscreen-return-to-inline.html

  • platform/mac/TestExpectations:
9:14 AM Changeset in webkit [259530] by mark.lam@apple.com
  • 2 edits in trunk/JSTests

Gardening: skip test for ARMv7 and MIPS to green the bots until the failure can be investigated.
https://bugs.webkit.org/show_bug.cgi?id=210003

Not reviewed.

  • stress/typed-array-subarray-can-throw-oom-error.js:

Apr 3, 2020:

11:13 PM Changeset in webkit [259529] by Alexey Shvayka
  • 16 edits
    4 moves
    139 adds
    8 deletes in trunk/JSTests

Update test262 to commit 62b8fce38971
https://bugs.webkit.org/show_bug.cgi?id=209979

Reviewed by Ross Kirsling.

  • .gitattributes: Added.
  • test262/config.yaml: Skip "logical-assignment-operators" and "Promise.any" features.
  • test262/expectations.yaml:
  • test262/harness/*: Updated.
  • test262/latest-changes-summary.txt:
  • test262/test/*: Updated.
  • test262/test262-Revision.txt:
10:22 PM Changeset in webkit [259528] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

WebPlatformStrategies::{readBufferFromPasteboard,bufferForType} should validate their size parameter
<https://webkit.org/b/209997>
<rdar://problem/60890565>

Reviewed by Wenson Hsieh.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):

  • Validate the size parameter.
10:06 PM Changeset in webkit [259527] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix: HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
https://bugs.webkit.org/show_bug.cgi?id=209925

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::elementFromPastNamesMap const):

  • Apply macros consistently. Regressed in r259513.
7:42 PM Changeset in webkit [259526] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebKit

The IPC message “registerAttachmentsFromSerializedData" should be capitalized
https://bugs.webkit.org/show_bug.cgi?id=209995
<rdar://problem/61283172>

Reviewed by Tim Horton.

Tweak the name of this IPC message so that it begins with a capital letter. No change in behavior.

  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::registerAttachments):

6:04 PM Changeset in webkit [259525] by Jack Lee
  • 3 edits in trunk/Source/WebCore

Protect contentFrame in SubframeLoader::loadOrRedirectSubframe with RefPtr.
https://bugs.webkit.org/show_bug.cgi?id=127096
<rdar://problem/61221941>

Reviewed by Alex Christensen.

ContentFrame is used throughout loadOrRedirectSubframe so it needs to be protected with RefPtr.
And if loader changes frame in SubframeLoader::loadSubframe, return nullptr to notify the caller.

No new tests, covered by existing test.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::loadOrRedirectSubframe):
(WebCore::SubframeLoader::loadSubframe):

  • loader/SubframeLoader.h:
6:01 PM Changeset in webkit [259524] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: disclosure arrows should be shown if a folder is added to the navigation sidebar
https://bugs.webkit.org/show_bug.cgi?id=209937

Reviewed by Timothy Hatcher.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype._addStyleSheet):
(WI.SourcesNavigationSidebarPanel.prototype._addScript):

5:44 PM Changeset in webkit [259523] by commit-queue@webkit.org
  • 47 edits in trunk

Add SPI to make WKUserScripts wait for a notification
https://bugs.webkit.org/show_bug.cgi?id=209845
<rdar://problem/60342299>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-03
Reviewed by Chris Dumez.

Source/WebCore:

There's also SPI on WKWebView to provide this notification, and on WKWebViewConfiguration to start out with this notification.

  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure):

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure):

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::createDocumentStructure):

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::finishedParsing):

  • page/Frame.cpp:

(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptImmediately):

  • page/Page.cpp:

(WebCore::m_deviceOrientationUpdateProvider):
(WebCore::Page::notifyToInjectUserScripts):
(WebCore::Page::addUserScriptAwaitingNotification):
(WebCore::Page::injectUserStyleSheet):
(WebCore::Page::removeInjectedUserStyleSheet):

  • page/Page.h:

(WebCore::Page::hasBeenNotifiedToInjectUserScripts const):

  • page/PageConfiguration.h:
  • page/UserContentTypes.h:

(): Deleted.

  • page/UserScript.h:

(WebCore::UserScript::UserScript):
(WebCore::UserScript::waitForNotificationBeforeInjecting const):
(WebCore::UserScript::encode const):
(WebCore::UserScript::decode):

  • page/UserScriptTypes.h:

(): Deleted.

  • page/UserStyleSheet.h:

(WebCore::UserStyleSheet::UserStyleSheet):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::startElementNs):

Source/WebKit:

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toUserScriptInjectionTime):
(WebKit::toWKUserScriptInjectionTime):
(WebKit::toUserContentInjectedFrames):

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:
  • Shared/WebUserContentControllerDataTypes.cpp:

(WebKit::WebUserScriptData::decode):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::userScriptsShouldWaitUntilNotification const):
(API::PageConfiguration::setUserScriptsShouldWaitUntilNotification):

  • UIProcess/API/APIUserScript.h:
  • UIProcess/API/C/WKPageGroup.cpp:

(WKPageGroupAddUserScript):

  • UIProcess/API/C/WKUserScriptRef.cpp:

(WKUserScriptCreateWithSource):
(WKUserScriptGetMainFrameOnly):

  • UIProcess/API/Cocoa/WKUserScript.mm:

(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
(-[WKUserScript isForMainFrameOnly]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:waitForNotification:]):

  • UIProcess/API/Cocoa/WKUserScriptInternal.h:

(API::toWebCoreUserScriptInjectionTime):
(API::toWKUserScriptInjectionTime):

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

(-[WKWebView _notifyUserScripts]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _userScriptsShouldWaitUntilNotification]):
(-[WKWebViewConfiguration _setUserScriptsShouldWaitUntilNotification:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKUserStyleSheet.mm:

(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
(-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
(-[_WKUserStyleSheet isForMainFrameOnly]):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::addUserScriptInternal):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_processDisplayName):
(WebKit::WebPage::notifyUserScripts):
(WebKit::WebPage::addUserScript):

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

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _injectOutlookQuirksScript]):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::addUserScriptToGroup):
(WebView::addUserStyleSheetToGroup):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

5:16 PM Changeset in webkit [259522] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Use-after-move of formState in WebCore::PolicyChecker::checkNavigationPolicy()
https://bugs.webkit.org/show_bug.cgi?id=209987

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-03
Reviewed by Chris Dumez.

Use std::exchange because formState is used later.
No change in behavior, but this will allow use-after-move hunts to continue.

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):

4:45 PM Changeset in webkit [259521] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit

Use AuthenticationChallenge instead of AuthenticationChallengeProxy for ResourceLoadDelegate
https://bugs.webkit.org/show_bug.cgi?id=207639

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-03
Reviewed by David Kilzer.

In r254345 my younger and more naive self used AuthenticationChallengeProxy instead of AuthenticationChallenge
because he didn't know about the WebCore::mac function, which is called by AuthenticationChallengeProxy, and it's
all I needed to get an NSURLAuthenticationChallenge. Skipping the AuthenticationChallengeProxy step cleans up
AuthenticationChallengeProxy by removing the unnecessary ability to have a null CompletionHandler.

Covered by existing tests.

  • UIProcess/API/APIResourceLoadClient.h:
  • UIProcess/Authentication/AuthenticationChallengeProxy.cpp:

(WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
(): Deleted.

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

(WebKit::ResourceLoadDelegate::ResourceLoadClient::didReceiveChallenge const):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::resourceLoadDidReceiveChallenge):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
4:39 PM Changeset in webkit [259520] by Kate Cheney
  • 8 edits in trunk

Prevent non app-bound domain cookies from being read or set using API calls
https://bugs.webkit.org/show_bug.cgi?id=209926
<rdar://problem/61071428>

Reviewed by Brady Eidson.

Source/WebKit:

This patch filters out setting and fetching of cookies via API call
to only set or return app-bound cookies.

  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::filterAppBoundCookies):
This function queries the websiteDataStore for the WKAppBoundDomains
entries and filters out non app-bound domains.

(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::cookiesForURL):
(API::HTTPCookieStore::setCookies):
These functions were updated to set/return the cookies after they've
been filtered through the WKAppBoundDomains.

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _appBoundDomains:]):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::getAppBoundDomains const):
(WebKit::WebsiteDataStore::appBoundDomainsForTesting const): Deleted.
Utilize a function formerly used for testing only to be used in the
HTTPCookieStore.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Added 3 new API tests to test that non app-bound cookies are not being
set or returned via API calls. Also added a function to reset state
between tests for internal debugging.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(setUpCookieTest):
(TEST):

3:55 PM Changeset in webkit [259519] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: objectStoreInfo in SQLiteIDBBackingStore::getRecord
https://bugs.webkit.org/show_bug.cgi?id=209976
<rdar://problem/55005363>

Reviewed by Geoffrey Garen.

Return error if objectStoreInfo is null in SQLiteIDBBackingStore::getRecord, because there is a possibility
SQLiteIDBBackingStore does not have requested objectStoreInfo.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):

3:45 PM Changeset in webkit [259518] by wenson_hsieh@apple.com
  • 7 edits in trunk

Add more logging to help diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=209988

Reviewed by Timothy Hatcher.

Source/WebCore:

Remove logging that was previously added in r259465.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard updateSupportedTypeIdentifiers:]):

Source/WebKit:

Replace logging that was previously added in r259465 with different logging. The fact that the prior logging
never showed up in the failing tests suggests that the problem happens earlier than I had expected, so we need
to ensure that codepaths for preparing and beginning a drag session are logged instead.

This turns several existing RELEASE_LOGs in WKContentView into NSLogs, so that they will show up in test
failure output when run on the bots.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleDragStartRequest:]):
(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:canHandleSession:]):
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidUpdate:]):
(-[WKContentView dropInteraction:sessionDidExit:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):

Tools:

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

Fix a few stray style mistakes (unnecessary .get()s).

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator _advanceProgress]):

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

[iOS] Give RunningBoard entitlement to all our child processes
https://bugs.webkit.org/show_bug.cgi?id=209986
<rdar://problem/61275270>

Reviewed by Geoffrey Garen.

Give RunningBoard entitlement to all our child processes on iOS. As we are
transitioning to RunningBoard process assertions, it is important for the
target process of those assertion to have the
com.apple.runningboard.assertions.webkit entitlement.

  • Scripts/process-entitlements.sh:
3:04 PM Changeset in webkit [259516] by Truitt Savell
  • 20 edits
    4 deletes in trunk

Unreviewed, reverting r259440.

Introduced 2 failing tests on Mac and iOS

Reverted changeset:

"Add SPI to configure WebsiteDataStores with a URL for
standalone web applications and use it to disable first-party
website data removal in ITP"
https://bugs.webkit.org/show_bug.cgi?id=209634
https://trac.webkit.org/changeset/259440

2:11 PM Changeset in webkit [259515] by Alan Coon
  • 1 copy in tags/Safari-610.1.8.2

Tag Safari-610.1.8.2.

2:09 PM Changeset in webkit [259514] by Alan Coon
  • 2 edits in branches/safari-610.1.8-branch/Source/ThirdParty/libwebrtc

Cherry-pick r259397. rdar://problem/61273057

Build fix after r259385.

Reviewed by David Kilzer, Youenn Fablet.

Convert isStandardFrameSize() into a lambda function since it only has one call site.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: (-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): (isStandardFrameSize): Deleted.

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

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

HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
https://bugs.webkit.org/show_bug.cgi?id=209925

Reviewed by Wenson Hsieh.

Like r259393, this patch replaces the HashMap of AtomString to the raw pointer of a FormNamedItem
by a HashMap of AtomString to WeakPtr of a FormNamedItem.

It also replaces a bunch of ASSERT_WITH_SECURITY_IMPLICATIONs with ASSERTs since there are no more
security implications left after this patch.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::formElementIndex):
(WebCore::HTMLFormElement::removeFormElement):
(WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap const):
(WebCore::HTMLFormElement::elementFromPastNamesMap const):
(WebCore::HTMLFormElement::addToPastNamesMap):
(WebCore::HTMLFormElement::removeFromPastNamesMap):

  • html/HTMLFormElement.h:
1:55 PM Changeset in webkit [259512] by timothy_horton@apple.com
  • 9 edits
    2 adds in trunk/Source

Add a visual debug indicator for locating and identifying all kinds of WebViews
https://bugs.webkit.org/show_bug.cgi?id=209982
<rdar://problem/60339870>

Reviewed by Simon Fraser.

Source/WebCore:

Add a debug overlay that can be enabled with a single switch for all
*WebView variants, which indicates the type of *WebView in an unmissable,
gaudy fashion.

This is intended to address some shortcomings of existing mechanisms
that people use to answer the "what kind of web view is X app using?"
question. Specifically:

  • it will appear even if the Web Content process does not launch or crashes
  • it will appear even if a custom content view is being used (e.g. PDF)
  • it will appear even if compositing is not enabled (e.g. in a legacy WebView on macOS)
  • it explicitly states in written text the class name of the web view, with no need for interpreting colors
  • it covers the entire web view, so cannot be accidentally obscured

No new tests, just debugging UI.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • testing/cocoa/WebViewVisualIdentificationOverlay.h: Added.
  • testing/cocoa/WebViewVisualIdentificationOverlay.mm: Added.

(+[WebViewVisualIdentificationOverlay shouldIdentifyWebViews]):
Use a single default across all kinds of WebViews, instead of using
WebPreferences and friends, in order to make it extremely easy to turn on,
and because it's intended to be set globally, and is not useful on a
per-view basis.

(+[WebViewVisualIdentificationOverlay installForWebViewIfNeeded:kind:deprecated:]):
(-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]):
(-[WebViewVisualIdentificationOverlay dealloc]):
(-[WebViewVisualIdentificationOverlay observeValueForKeyPath:ofObject:change:context:]):
(-[WebViewVisualIdentificationOverlay drawLayer:inContext:]):
Draw a wash and the class name over the entire face of the web view.
The wash is blue for WKWebView and red for all of the deprecated web views (WKView, WebView, UIWebView).

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView initWithFrame:processPool:configuration:]):
Adopt in WKWebView and WKView.

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
Adopt for WebView on macOS (UIWebView will install it itself on iOS).

  • WebView/WebViewPrivate.h:

Expose _installVisualIdentificationOverlayForViewIfNeeded:kind: for UIWebView's use.
It is slightly unfortunate to expose SPI that uses UIView from a framework
underneath UIKit, but there is no other single place where this code can live
and not be a minor layering problem. Since it's debug UI, it seems passable.

1:40 PM Changeset in webkit [259511] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebCore

Cherry-pick r259378. rdar://problem/61269720

Crash in WebCore::HTMLDocumentParser::insert
https://bugs.webkit.org/show_bug.cgi?id=209892

Reviewed by Darin Adler.

Speculative fix to check that the parser hasn't been detached before running preload scanner.

No new tests since there is no reproduction and I couldn't come up with one.

  • html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert):

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

1:40 PM Changeset in webkit [259510] by Alan Coon
  • 70 edits in branches/safari-609-branch/Source

Cherry-pick r259355. rdar://problem/61269744

Bindings that override getOwnPropertySlotByIndex need to say they MayHaveIndexedAccessors
https://bugs.webkit.org/show_bug.cgi?id=209762

Reviewed by Darin Adler.

Source/JavaScriptCore:

Change indexingType to indexingModeIncludingHistory to more
clearly indicate the expected range of possible valid values.

  • runtime/StructureInlines.h: (JSC::Structure::create):

Source/WebCore:

There may be places where we rely on this for semantic
correctness. I couldn't find any right now but we might as
well be conservative since this isn't a performance regression.

  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader):
  • bindings/scripts/test/JS/JSInterfaceName.h: (WebCore::JSInterfaceName::createStructure):
  • bindings/scripts/test/JS/JSMapLike.h: (WebCore::JSMapLike::createStructure):
  • bindings/scripts/test/JS/JSReadOnlyMapLike.h: (WebCore::JSReadOnlyMapLike::createStructure):
  • bindings/scripts/test/JS/JSReadOnlySetLike.h: (WebCore::JSReadOnlySetLike::createStructure):
  • bindings/scripts/test/JS/JSSetLike.h: (WebCore::JSSetLike::createStructure):
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h: (WebCore::JSTestActiveDOMObject::createStructure):
  • bindings/scripts/test/JS/JSTestCEReactions.h: (WebCore::JSTestCEReactions::createStructure):
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: (WebCore::JSTestCEReactionsStringifier::createStructure):
  • bindings/scripts/test/JS/JSTestCallTracer.h: (WebCore::JSTestCallTracer::createStructure):
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: (WebCore::JSTestClassWithJSBuiltinConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestDOMJIT.h: (WebCore::JSTestDOMJIT::createStructure):
  • bindings/scripts/test/JS/JSTestEnabledBySetting.h: (WebCore::JSTestEnabledBySetting::createStructure):
  • bindings/scripts/test/JS/JSTestEnabledForContext.h: (WebCore::JSTestEnabledForContext::createStructure):
  • bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestEventTarget.h: (WebCore::JSTestEventTarget::createStructure):
  • bindings/scripts/test/JS/JSTestException.h: (WebCore::JSTestException::createStructure):
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h: (WebCore::JSTestGenerateIsReachable::createStructure):
  • bindings/scripts/test/JS/JSTestGlobalObject.h: (WebCore::JSTestGlobalObject::createStructure):
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: (WebCore::JSTestIndexedSetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: (WebCore::JSTestIndexedSetterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: (WebCore::JSTestIndexedSetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h: (WebCore::JSTestInterfaceLeadingUnderscore::createStructure):
  • bindings/scripts/test/JS/JSTestIterable.h: (WebCore::JSTestIterable::createStructure):
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: (WebCore::JSTestJSBuiltinConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: (WebCore::JSTestNamedAndIndexedSetterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: (WebCore::JSTestNamedDeleterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: (WebCore::JSTestNamedDeleterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: (WebCore::JSTestNamedDeleterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: (WebCore::JSTestNamedDeleterWithIndexedGetter::createStructure):
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: (WebCore::JSTestNamedGetterCallWith::createStructure):
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: (WebCore::JSTestNamedGetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: (WebCore::JSTestNamedGetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: (WebCore::JSTestNamedSetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: (WebCore::JSTestNamedSetterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: (WebCore::JSTestNamedSetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: (WebCore::JSTestNamedSetterWithIndexedGetter::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: (WebCore::JSTestNamedSetterWithOverrideBuiltins::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: (WebCore::JSTestNamedSetterWithUnforgableProperties::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::createStructure):
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure):
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h: (WebCore::JSTestOverloadedConstructors::createStructure):
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h: (WebCore::JSTestOverloadedConstructorsWithSequence::createStructure):
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h: (WebCore::JSTestOverrideBuiltins::createStructure):
  • bindings/scripts/test/JS/JSTestPluginInterface.h: (WebCore::JSTestPluginInterface::createStructure):
  • bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h: (WebCore::JSTestPromiseRejectionEvent::createStructure):
  • bindings/scripts/test/JS/JSTestSerialization.h: (WebCore::JSTestSerialization::createStructure):
  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h: (WebCore::JSTestSerializationIndirectInheritance::createStructure):
  • bindings/scripts/test/JS/JSTestSerializationInherit.h: (WebCore::JSTestSerializationInherit::createStructure):
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h: (WebCore::JSTestSerializationInheritFinal::createStructure):
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure):
  • bindings/scripts/test/JS/JSTestStringifier.h: (WebCore::JSTestStringifier::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h: (WebCore::JSTestStringifierAnonymousOperation::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.h: (WebCore::JSTestStringifierNamedOperation::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h: (WebCore::JSTestStringifierOperationImplementedAs::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h: (WebCore::JSTestStringifierOperationNamedToString::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h: (WebCore::JSTestStringifierReadOnlyAttribute::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h: (WebCore::JSTestStringifierReadWriteAttribute::createStructure):
  • bindings/scripts/test/JS/JSTestTypedefs.h: (WebCore::JSTestTypedefs::createStructure):

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

1:39 PM Changeset in webkit [259509] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r257209. rdar://problem/61269710

Protect from null session in NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=208127
rdar://problem/57937917

Reviewed by Chris Dumez.

In case of a data task whose session is destroyed, do not follow redirection early on.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

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

1:39 PM Changeset in webkit [259508] by Alan Coon
  • 16 edits in branches/safari-609-branch/Source

Cherry-pick r256900. rdar://problem/61269733

SWServer::claim should check for the service worker to be active
https://bugs.webkit.org/show_bug.cgi?id=207739
<rdar://problem/45441129>

Reviewed by Alex Christensen.

Source/WebCore:

claim is only working for service workers that are active.
But there might be a time when a service worker is active in its web process but redundant in networking process.
Thus, we need to move the check from WebProcess to NetworkProcess.

  • workers/service/ServiceWorkerClients.cpp: (WebCore::ServiceWorkerClients::claim):
  • workers/service/context/SWContextManager.h:
  • workers/service/server/SWServer.cpp: (WebCore::SWServer::claim):
  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerToContextConnection.cpp: (WebCore::SWServerToContextConnection::claim):
  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp: (WebCore::SWServerWorker::claim): Deleted.
  • workers/service/server/SWServerWorker.h: (WebCore::SWServerWorker::isActive const):

Source/WebKit:

Use Async Reply to remove the need for a map and passing integers around.

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp: (WebKit::WebSWServerToContextConnection::claimCompleted): Deleted.
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::claim): (WebKit::WebSWContextManagerConnection::claimCompleted): Deleted.
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:

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

1:33 PM Changeset in webkit [259507] by Kate Cheney
  • 11 edits in trunk

Remove _setIsNavigatingToAppBoundDomain testing SPI
https://bugs.webkit.org/show_bug.cgi?id=209973
<rdar://problem/61264350>

Reviewed by David Kilzer.

This SPI is no longer needed to set a webView as navigating to an
app-bound domain. We can now load a local file instead.

Source/WebKit:

No new tests, confirmed behavior by existing tests.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setIsNavigatingToAppBoundDomain:completionHandler:]): Deleted.

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

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainTesting): Deleted.

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

(WebKit::WebPage::setIsNavigatingToAppBoundDomainTesting): Deleted.

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

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html:
1:28 PM Changeset in webkit [259506] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed sandbox compile fix.

  • WebProcess/com.apple.WebProcess.sb.in:
1:13 PM Changeset in webkit [259505] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[Cocoa] Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler
<https://webkit.org/b/209981>
<rdar://problem/61237674>

Reviewed by Darin Adler.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didCreateSleepDisabler):

  • Remove MESSAGE_CHECK for identifier since decoding detects invalid values.
  • Add MESSAGE_CHECK for reason since a NULL string would cause CFStringCreateWithCString() to crash later.

(WebKit::WebProcessProxy::didDestroySleepDisabler):

  • Remove MESSAGE_CHECK for identifier since decoding detects invalid values.
1:12 PM Changeset in webkit [259504] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

1:06 PM Changeset in webkit [259503] by Alan Coon
  • 8 edits in branches/safari-610.1.8-branch/Source

Versioning.

12:58 PM Changeset in webkit [259502] by Alan Coon
  • 70 edits in branches/safari-609.2.1.2-branch/Source

Cherry-pick r259355. rdar://problem/61269741

Bindings that override getOwnPropertySlotByIndex need to say they MayHaveIndexedAccessors
https://bugs.webkit.org/show_bug.cgi?id=209762

Reviewed by Darin Adler.

Source/JavaScriptCore:

Change indexingType to indexingModeIncludingHistory to more
clearly indicate the expected range of possible valid values.

  • runtime/StructureInlines.h: (JSC::Structure::create):

Source/WebCore:

There may be places where we rely on this for semantic
correctness. I couldn't find any right now but we might as
well be conservative since this isn't a performance regression.

  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader):
  • bindings/scripts/test/JS/JSInterfaceName.h: (WebCore::JSInterfaceName::createStructure):
  • bindings/scripts/test/JS/JSMapLike.h: (WebCore::JSMapLike::createStructure):
  • bindings/scripts/test/JS/JSReadOnlyMapLike.h: (WebCore::JSReadOnlyMapLike::createStructure):
  • bindings/scripts/test/JS/JSReadOnlySetLike.h: (WebCore::JSReadOnlySetLike::createStructure):
  • bindings/scripts/test/JS/JSSetLike.h: (WebCore::JSSetLike::createStructure):
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h: (WebCore::JSTestActiveDOMObject::createStructure):
  • bindings/scripts/test/JS/JSTestCEReactions.h: (WebCore::JSTestCEReactions::createStructure):
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: (WebCore::JSTestCEReactionsStringifier::createStructure):
  • bindings/scripts/test/JS/JSTestCallTracer.h: (WebCore::JSTestCallTracer::createStructure):
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: (WebCore::JSTestClassWithJSBuiltinConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestDOMJIT.h: (WebCore::JSTestDOMJIT::createStructure):
  • bindings/scripts/test/JS/JSTestEnabledBySetting.h: (WebCore::JSTestEnabledBySetting::createStructure):
  • bindings/scripts/test/JS/JSTestEnabledForContext.h: (WebCore::JSTestEnabledForContext::createStructure):
  • bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestEventTarget.h: (WebCore::JSTestEventTarget::createStructure):
  • bindings/scripts/test/JS/JSTestException.h: (WebCore::JSTestException::createStructure):
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h: (WebCore::JSTestGenerateIsReachable::createStructure):
  • bindings/scripts/test/JS/JSTestGlobalObject.h: (WebCore::JSTestGlobalObject::createStructure):
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: (WebCore::JSTestIndexedSetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: (WebCore::JSTestIndexedSetterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: (WebCore::JSTestIndexedSetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h: (WebCore::JSTestInterfaceLeadingUnderscore::createStructure):
  • bindings/scripts/test/JS/JSTestIterable.h: (WebCore::JSTestIterable::createStructure):
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: (WebCore::JSTestJSBuiltinConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: (WebCore::JSTestNamedAndIndexedSetterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: (WebCore::JSTestNamedDeleterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: (WebCore::JSTestNamedDeleterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: (WebCore::JSTestNamedDeleterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: (WebCore::JSTestNamedDeleterWithIndexedGetter::createStructure):
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: (WebCore::JSTestNamedGetterCallWith::createStructure):
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: (WebCore::JSTestNamedGetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: (WebCore::JSTestNamedGetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: (WebCore::JSTestNamedSetterNoIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: (WebCore::JSTestNamedSetterThrowingException::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: (WebCore::JSTestNamedSetterWithIdentifier::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: (WebCore::JSTestNamedSetterWithIndexedGetter::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: (WebCore::JSTestNamedSetterWithOverrideBuiltins::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: (WebCore::JSTestNamedSetterWithUnforgableProperties::createStructure):
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::createStructure):
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure):
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h: (WebCore::JSTestOverloadedConstructors::createStructure):
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h: (WebCore::JSTestOverloadedConstructorsWithSequence::createStructure):
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h: (WebCore::JSTestOverrideBuiltins::createStructure):
  • bindings/scripts/test/JS/JSTestPluginInterface.h: (WebCore::JSTestPluginInterface::createStructure):
  • bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h: (WebCore::JSTestPromiseRejectionEvent::createStructure):
  • bindings/scripts/test/JS/JSTestSerialization.h: (WebCore::JSTestSerialization::createStructure):
  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h: (WebCore::JSTestSerializationIndirectInheritance::createStructure):
  • bindings/scripts/test/JS/JSTestSerializationInherit.h: (WebCore::JSTestSerializationInherit::createStructure):
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h: (WebCore::JSTestSerializationInheritFinal::createStructure):
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure):
  • bindings/scripts/test/JS/JSTestStringifier.h: (WebCore::JSTestStringifier::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h: (WebCore::JSTestStringifierAnonymousOperation::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.h: (WebCore::JSTestStringifierNamedOperation::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h: (WebCore::JSTestStringifierOperationImplementedAs::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h: (WebCore::JSTestStringifierOperationNamedToString::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h: (WebCore::JSTestStringifierReadOnlyAttribute::createStructure):
  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h: (WebCore::JSTestStringifierReadWriteAttribute::createStructure):
  • bindings/scripts/test/JS/JSTestTypedefs.h: (WebCore::JSTestTypedefs::createStructure):

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

12:58 PM Changeset in webkit [259501] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/WebCore

Cherry-pick r259305. rdar://problem/61231978

Invalid memory access @ WebCore::FrameLoader::dispatchDidCommitLoad
https://bugs.webkit.org/show_bug.cgi?id=209786

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-03-31
Reviewed by Ryosuke Niwa.

No new tests. Reduced test would be added later. Currently issue is verified with the original testcase in associated radar-58416328.

Webkit1 only issue, where m_client.dispatchDidCommitLoad in FrameLoader::dispatchDidCommitLoad could cause the frame
to be destroyed, and m_frame still being accessed outside. Changes made to protect the DocumentLoader and Frame.

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData):

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

12:58 PM Changeset in webkit [259500] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebCore

Cherry-pick r259244. rdar://problem/61231864

Assertion failure in HTMLFormElement::formElementIndex
https://bugs.webkit.org/show_bug.cgi?id=209643

Reviewed by Darin Adler.

The bug was caused by FormAssociatedElement::findAssociatedForm finding a wrong form element
when it's called on an element which appears later in the removed subtree.

When we find the new form element to associate this element with, check to make sure its root
element is that of the tree scope. This condition will be false if this element is in in the midst
of being removed.

  • html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::findAssociatedForm):

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

12:58 PM Changeset in webkit [259499] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Cherry-pick r259056. rdar://problem/61231908

Force Touch preview on file:/// URL works while clicking on the URL is blocked
https://bugs.webkit.org/show_bug.cgi?id=209589
<rdar://57687893>

Reviewed by Antoine Quint.

The immediate action for links should never trigger on file: URLs.

  • UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController _defaultAnimationController]):

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

12:58 PM Changeset in webkit [259498] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Cherry-pick r258902. rdar://problem/61231866

IPC::Decoder::decodeFixedLengthData() should be marked WARN_UNUSED_RETURN
<https://webkit.org/b/209448>
<rdar://problem/60797998>

Reviewed by Chris Dumez.

  • Platform/IPC/ArgumentCoders.h: (struct VectorArgumentCoder::decode):
  • Check the return value of Decoder::decodeFixedLengthData().
  • Platform/IPC/Decoder.h: (IPC::Decoder::decodeFixedLengthData): Add WARN_UNUSED_RETURN.

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

12:58 PM Changeset in webkit [259497] by Alan Coon
  • 8 edits in branches/safari-609.2.1.2-branch/Source/JavaScriptCore

Cherry-pick r258901. rdar://problem/61231922

HasIndexedProperty should know about sane chain
https://bugs.webkit.org/show_bug.cgi?id=209457

Reviewed by Saam Barati.

This patch makes it so HasIndexedProperty is aware of
sane chain. This is useful because, most of the time we do an
indexed in it is on an array. If the array has a sane chain (i.e.
no indexed properties on it's prototypes and has the default
prototype chain) then we can just test for the index being a hole.

Note, we could also just convert OOB indices into false but that
should happen in another patch.
https://bugs.webkit.org/show_bug.cgi?id=209456

I didn't add any tests because it turns out we already have a ton.
I know this because I broke most of them repeatedly... >.>

  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGClobberize.h: (JSC::DFG::clobberize):
  • dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): (JSC::DFG::FixupPhase::setSaneChainIfPossible): (JSC::DFG::FixupPhase::convertToHasIndexedProperty):
  • dfg/DFGNodeType.h:
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty): (JSC::FTL::DFG::LowerDFGToB3::speculateAndJump):
  • jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::isEmpty):

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

12:58 PM Changeset in webkit [259496] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Cherry-pick r258814. rdar://problem/61231972

decodeSharedBuffer() in WebCoreArgumentCoders.cpp should validate bufferSize
<https://webkit.org/b/209373>
<rdar://problem/60610919>

Reviewed by Darin Adler.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::decodeSharedBuffer):
  • Return early if bufferSize is too big.

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

12:57 PM Changeset in webkit [259495] by Alan Coon
  • 5 edits
    2 adds in branches/safari-609.2.1.2-branch

Cherry-pick r258799. rdar://problem/61231946

Content-Type & Nosniff Ignored on XML External Entity Resources
<https://webkit.org/b/191171>
<rdar://problem/45763222>

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml

  • platform/MIMETypeRegistry.cpp: (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
  • platform/MIMETypeRegistry.h: (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
  • Checks for XML external entity MIME types.
  • xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::externalEntityMimeTypeAllowedByNosniff): Add.
  • Checks whether the MIME type is valid based on the presence of the "X-Content-Type-Options: nosniff" header. (WebCore::openFunc):
  • Drop the contents of the resource that was returned and print an error message to the Web Inspector console if externalEntityMimeTypeAllowedByNosniff() says the MIME type is not allowed.

LayoutTests:

  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt: Add.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml: Add.

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

12:57 PM Changeset in webkit [259494] by Alan Coon
  • 5 edits in branches/safari-609.2.1.2-branch

Cherry-pick r258741. rdar://problem/61231885

Sanitize suggested download filename received from web process
https://bugs.webkit.org/show_bug.cgi?id=209300
<rdar://problem/59487723>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Chris Dumez.

Source/WebKit:

  • UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):

LayoutTests:

  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:

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

12:57 PM Changeset in webkit [259493] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/ThirdParty/libwebrtc

Cherry-pick r258690. rdar://problem/61231915

Cherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
https://bugs.webkit.org/show_bug.cgi?id=209204
<rdar://problem/59362671>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Youenn Fablet.

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:

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

12:57 PM Changeset in webkit [259492] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Cherry-pick r258559. rdar://problem/61231877

Terminate the WebContent process when receiving invalid IPC from a WebInspector session
https://bugs.webkit.org/show_bug.cgi?id=209157
<rdar://problem/58961055>

Reviewed by Chris Dumez.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::backForwardGoToItemShared): Add a message check that we are not receiving the request from a WebInspector page. (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): Switch to a release assert.

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

12:57 PM Changeset in webkit [259491] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/WebCore

Cherry-pick r258464. rdar://problem/61231891

Call SVGTRefElement::buildPendingResource in SVGElement::didFinishInsertingNode
https://bugs.webkit.org/show_bug.cgi?id=208981

Reviewed by Antti Koivisto.

This patch moves the call to SVGTRefElement::buildPendingResource from SVGElement::insertedIntoAncestor
to SVGElement::didFinishInsertingNode.

  • svg/SVGElement.cpp: (WebCore::SVGElement::insertedIntoAncestor): Return true when the element has a pending resource ID. (WebCore::SVGElement::didFinishInsertingNode): Added. Calls buildPendingResourcesIfNeeded.
  • svg/SVGElement.h:

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

12:57 PM Changeset in webkit [259490] by Alan Coon
  • 4 edits
    2 adds in branches/safari-609.2.1.2-branch

Cherry-pick r258459. rdar://problem/61231983

SVGMatrix should have the access right of its owner SVGTransform always
https://bugs.webkit.org/show_bug.cgi?id=207462

Reviewed by Simon Fraser.

Source/WebCore:

The SVGMatrix needs to be reattached to its owner SVGTransform when the
access right of this owner changes. The access right of the owner changes
when it gets attached to or detached from a higher level owner.

Test: svg/dom/SVGTransformList-anim-read-only.html

  • svg/SVGTransform.h:
  • svg/properties/SVGProperty.h: (WebCore::SVGProperty::attach): (WebCore::SVGProperty::detach): (WebCore::SVGProperty::reattach):

LayoutTests:

  • svg/dom/SVGTransformList-anim-read-only-expected.txt: Added.
  • svg/dom/SVGTransformList-anim-read-only.html: Added.

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

12:57 PM Changeset in webkit [259489] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Cherry-pick r258401. rdar://problem/61231940

WebPageProxy::SetPromisedDataForImage should validate its imageSize and archiveSize parameters
<https://webkit.org/b/209029>
<rdar://problem/60181394>

Reviewed by Youenn Fablet.

  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::setPromisedDataForImage):
  • Validate imageSize and archiveSize using MESSAGE_CHECK().
  • Add static_cast<size_t>() to imageSize and archiveSize parameters to denote type change.
  • Add nullptr check for SharedMemory::map() result with archiveHandle.

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

12:57 PM Changeset in webkit [259488] by Alan Coon
  • 5 edits in branches/safari-609.2.1.2-branch/Source/WebCore

Cherry-pick r258278. rdar://problem/61231870

SVG filter triggers unstable layout.
https://bugs.webkit.org/show_bug.cgi?id=207444
rdar://problem/59297004

Reviewed by Simon Fraser.

SVG filter code marks DOM nodes dirty and schedules style recalc outside of the SVG root
while in layout. This could lead to unstable layout and cause battery drain.
(See webkit.org/b/208903)

  • rendering/RenderLayer.cpp: Remove filterNeedsRepaint(). It's a dangerously misleading name and should not be part of RenderLayer. (WebCore::RenderLayer::calculateClipRects const):
  • rendering/RenderLayer.h:
  • rendering/RenderLayerFilters.cpp: (WebCore::RenderLayerFilters::notifyFinished):
  • rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):

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

12:57 PM Changeset in webkit [259487] by Alan Coon
  • 3 edits
    1 add in branches/safari-609.2.1.2-branch

Cherry-pick r256766. rdar://problem/61231942

[Wasm] REGRESSION(r256665): Wasm->JS call IC needs to save memory size register
https://bugs.webkit.org/show_bug.cgi?id=207849

Reviewed by Mark Lam.

JSTests:

  • wasm/regress/regress-256665.js: Added. (f):

Source/JavaScriptCore:

When generating the call IC, we should select the callee saves using BoundsChecking mode in order
to obey to the calling conventions described in r256665. Currently, we won't restore the memory size
register when calling the Wasm LLInt through the call IC.

  • wasm/js/WebAssemblyFunction.cpp: (JSC::WebAssemblyFunction::calleeSaves const):

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

12:57 PM Changeset in webkit [259486] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/JSTests

Cherry-pick r256698. rdar://problem/61231902

Unreviewed: fix broken tests added in r256665
https://bugs.webkit.org/show_bug.cgi?id=207727

Our inline WAT doesn't seem to like named blocks/branch targets.

  • wasm/regress/llint-callee-saves-with-fast-memory.js:
  • wasm/regress/llint-callee-saves-without-fast-memory.js:

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

12:57 PM Changeset in webkit [259485] by Alan Coon
  • 9 edits
    2 adds in branches/safari-609.2.1.2-branch

Cherry-pick r256665. rdar://problem/61231902

[WASM] Wasm interpreter's calling convention doesn't match Wasm JIT's convention.
https://bugs.webkit.org/show_bug.cgi?id=207727

JSTests:

Reviewed by Mark Lam.

  • wasm/regress/llint-callee-saves-with-fast-memory.js: Added.
  • wasm/regress/llint-callee-saves-without-fast-memory.js: Added.

Source/JavaScriptCore:

Reviewed by Mark Lam.

The Wasm JIT has unusual calling conventions, which were further complicated by the addition
of the interpreter, and the interpreter did not correctly follow these conventions (by incorrectly
saving and restoring the callee save registers used for the memory base and size). Here's a summary
of the calling convention:

  • When entering Wasm from JS, the wrapper must:
    • Preserve the base and size when entering LLInt regardless of the mode. (Prior to this patch we only preserved the base in Signaling mode)
    • Preserve the memory base in either mode, and the size for BoundsChecking.
  • Both tiers must preserve every *other* register they use. e.g. the LLInt must preserve PB and wasmInstance, but must *not* preserve memoryBase and memorySize.
  • Changes to memoryBase and memorySize are visible to the caller. This means that:
    • Intra-module calls can assume these registers are up-to-date even if the memory was resized. The only exception here is if the LLInt calls a signaling JIT, in which case the JIT will not update the size register, since it won't be using it.
    • Inter-module and JS calls require the caller to reload these registers. These calls may result in memory changes (e.g. the callee may call memory.grow).
    • A Signaling JIT caller must be aware that the LLInt may trash the size register, since it always bounds checks.
  • llint/WebAssembly.asm:
  • wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::addCall):
  • wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::addCall):
  • wasm/WasmCallee.cpp: (JSC::Wasm::LLIntCallee::calleeSaveRegisters):
  • wasm/WasmCallingConvention.h:
  • wasm/WasmLLIntPlan.cpp: (JSC::Wasm::LLIntPlan::didCompleteCompilation):
  • wasm/WasmMemoryInformation.cpp: (JSC::Wasm::PinnedRegisterInfo::get): (JSC::Wasm::getPinnedRegisters): Deleted.

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

12:57 PM Changeset in webkit [259484] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebKit

Cherry-pick r254724. rdar://problem/61231960

IPC hardening for WebPageProxy::SetPromisedDataForImage message
https://bugs.webkit.org/show_bug.cgi?id=206380
<rdar://problem/58625196>

Reviewed by Geoffrey Garen.

IPC hardening for WebPageProxy::SetPromisedDataForImage message. Make sure the shared memory handle sent over IPC is not null
and null check the SharedMemory object after calling SharedMemory::map().

  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::setPromisedDataForImage):

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

12:50 PM Changeset in webkit [259483] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r8412): Use RetainPtr<> for NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]
<https://webkit.org/b/209980>

Reviewed by Darin Adler.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
Make use of RetainPtr<>.

12:25 PM Changeset in webkit [259482] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Fix bugs related to VideoTextureCopierCV and ANGLE roll script
https://bugs.webkit.org/show_bug.cgi?id=209943

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-03
Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

Update the update-angle.sh script to take into account the new
procedure for generating ANGLE's commit ID header file. This
enables ANGLE rolls into WebKit again.

  • update-angle.sh:

Source/WebCore:

Fixed longstanding preexisting bugs related to creation and
deletion of OpenGL objects inside VideoTextureCopierCV, including
in which context its internal framebuffer was created. Unbind the
output texture after hooking it up to the framebuffer to avoid any
appearance of rendering feedback loops.

Stop setting the WebGL compatibility context creation attribute
for VideoTextureCopier's context.

Covered by preexisting layout tests.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::VideoTextureCopierCV::VideoTextureCopierCV):
(WebCore::VideoTextureCopierCV::~VideoTextureCopierCV):
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

11:40 AM Changeset in webkit [259481] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] canonicalizeLocaleList should gracefully throw OOM error if input + error message is too large
https://bugs.webkit.org/show_bug.cgi?id=209971
<rdar://problem/61258621>

Reviewed by Mark Lam.

JSTests:

  • stress/intl-canonicalize-locale-list-error-oom.js: Added.

(shouldThrow):

Source/JavaScriptCore:

canonicalizeLocaleList generates error-message with input. If input is too large, error-message string
generation could fail due to OOM. We should gracefully throw OOM error instead of crashing. This strategy
follows to createError's error-message generation: if error-message generation fails, throwing OOM error.

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLocaleList):

11:34 AM Changeset in webkit [259480] by Ross Kirsling
  • 8 edits
    13 adds
    39 deletes in trunk

Move Intl tests from LayoutTests to JSTests
https://bugs.webkit.org/show_bug.cgi?id=209922

Reviewed by Yusuke Suzuki.

JSTests:

Intl doesn't depend on WebCore, so these tests shouldn't be layout tests.
(They do, however, require one method to be added to $vm.)

Since LayoutTests/js has its own test harness, I've also migrated each test case to use simpler assertions.

  • stress/array-to-locale-string.js: Removed -- subsumed by the following test.
  • stress/array-toLocaleString.js: Added.
  • stress/date-toLocaleString.js: Added.
  • stress/intl-collator.js: Added.
  • stress/intl-datetimeformat.js: Added.
  • stress/intl-default-locale.js: Added.
  • stress/intl-numberformat-format-to-parts.js: Added.
  • stress/intl-numberformat.js: Added.
  • stress/intl-object.js: Added.
  • stress/intl-pluralrules.js: Added.
  • stress/number-toLocaleString.js: Added.
  • stress/string-localeCompare.js: Added.
  • stress/string-toLocaleLowerCase.js: Added.
  • stress/string-toLocaleUpperCase.js: Added.

Source/JavaScriptCore:

  • tools/JSDollarVM.cpp:

(JSC::functionSetUserPreferredLanguages):
(JSC::JSDollarVM::finishCreation):
Add $vm.setUserPreferredLanguages, as needed by stress/intl-default-locale.js.

LayoutTests:

  • js/array-toLocaleString-expected.txt: Removed.
  • js/array-toLocaleString.html: Removed.
  • js/date-toLocaleString-expected.txt: Removed.
  • js/date-toLocaleString.html: Removed.
  • js/intl-collator-expected.txt: Removed.
  • js/intl-collator.html: Removed.
  • js/intl-datetimeformat-expected.txt: Removed.
  • js/intl-datetimeformat.html: Removed.
  • js/intl-default-locale-expected.txt: Removed.
  • js/intl-default-locale.html: Removed.
  • js/intl-expected.txt: Removed.
  • js/intl-numberformat-expected.txt: Removed.
  • js/intl-numberformat-format-to-parts-expected.txt: Removed.
  • js/intl-numberformat-format-to-parts.html: Removed.
  • js/intl-numberformat.html: Removed.
  • js/intl-pluralrules-expected.txt: Removed.
  • js/intl-pluralrules.html: Removed.
  • js/intl.html: Removed.
  • js/number-toLocaleString-expected.txt: Removed.
  • js/number-toLocaleString.html: Removed.
  • js/script-tests/array-toLocaleString.js: Removed.
  • js/script-tests/date-toLocaleString.js: Removed.
  • js/script-tests/intl-collator.js: Removed.
  • js/script-tests/intl-datetimeformat.js: Removed.
  • js/script-tests/intl-numberformat-format-to-parts.js: Removed.
  • js/script-tests/intl-numberformat.js: Removed.
  • js/script-tests/intl-pluralrules.js: Removed.
  • js/script-tests/intl.js: Removed.
  • js/script-tests/number-toLocaleString.js: Removed.
  • js/script-tests/string-localeCompare.js: Removed.
  • js/script-tests/string-toLocaleLowerCase.js: Removed.
  • js/script-tests/string-toLocaleUpperCase.js: Removed.
  • js/string-localeCompare-expected.txt: Removed.
  • js/string-localeCompare.html: Removed.
  • js/string-toLocaleLowerCase-expected.txt: Removed.
  • js/string-toLocaleLowerCase.html: Removed.
  • js/string-toLocaleUpperCase-expected.txt: Removed.
  • js/string-toLocaleUpperCase.html: Removed.
  • platform/ios-simulator/TestExpectations: Removed expectations.
  • platform/ios/TestExpectations: Removed expectations.
  • platform/mac/TestExpectations: Removed expectations.
  • platform/win/TestExpectations: Removed expectations.
11:30 AM Changeset in webkit [259479] by Devin Rousso
  • 2 edits in trunk/Source/JavaScriptCore

Web Inspector: increase the auto-inspect debugger timeout delay to account for slower networks/devices
https://bugs.webkit.org/show_bug.cgi?id=209940
<rdar://problem/61120919>

Reviewed by Joseph Pecoraro.

  • inspector/remote/cocoa/RemoteInspectorCocoa.mm:

(Inspector::RemoteInspector::updateAutomaticInspectionCandidate):

11:29 AM Changeset in webkit [259478] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] TypedArray#subarray should throw OOM error gracefully
https://bugs.webkit.org/show_bug.cgi?id=209974
<rdar://problem/61253901>

Reviewed by Mark Lam.

JSTests:

  • stress/typed-array-subarray-can-throw-oom-error.js: Added.

(foo):
(canThrow):
(bar):
(get bar):

Source/JavaScriptCore:

After r259069 change, possiblySharedBuffer can return nullptr if OOM happens.
However, TypedArray#subarray didn't handle this case properly. This patch throws
an OOM error appropriately if possiblySharedBuffer returns nullptr in TypedArray#subarray.

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

11:22 AM Changeset in webkit [259477] by eric.carlson@apple.com
  • 3 edits
    2 adds in trunk

Filter some capture device names
https://bugs.webkit.org/show_bug.cgi?id=209941
<rdar://problem/59141886>

Reviewed by Youenn Fablet.

Source/WebCore:

Test: fast/mediastream/anonymize-device-name.html

  • platform/mediastream/CaptureDevice.h:

(WebCore::CaptureDevice::label const):

LayoutTests:

  • fast/mediastream/anonymize-device-name-expected.txt: Added.
  • fast/mediastream/anonymize-device-name.html: Added.
11:06 AM Changeset in webkit [259476] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Color Form Control does not come up on second selection in macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=209939
<rdar://problem/61131345>

Reviewed by Wenson Hsieh.

On selection and manual dismissal of the form, we need to also call accessoryDone,
as the UIKit callbacks are not called on manual dismissal.

  • UIProcess/ios/forms/WKFormColorPicker.mm:

(-[WKColorPicker colorMatrixView:didTapColorButton:]):

11:00 AM Changeset in webkit [259475] by Keith Rollin
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Do not link with OpenGL on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=209946
<rdar://problem/61237956>

Reviewed by Sam Weinig.

OpenGL is not used in our build of ANGLE. Attempting to link with it
causes warnings, which can turn into errors in some cases (in
particular, when building with Xcode's "new" build system).

  • ANGLE.xcodeproj/project.pbxproj:
10:55 AM Changeset in webkit [259474] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[macOS] Update sandbox rules for correct sanitizer paths in current OS releases
https://bugs.webkit.org/show_bug.cgi?id=209818
<rdar://problem/58422996>

Unreviewed follow-up based on feedback from the sanitizer team.

The change in r259317 left the original, incorrect, 'literal' form of the path, rather
than the correct 'subpath' form. This corrects that issue.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
10:54 AM Changeset in webkit [259473] by Alan Coon
  • 1 copy in tags/Safari-610.1.8.1

Tag Safari-610.1.8.1.

10:53 AM Changeset in webkit [259472] by Alan Coon
  • 2 edits
    1 delete in branches/safari-610.1.8-branch/Source/ThirdParty/libwebrtc

Cherry-pick r259458. rdar://problem/61265583

Remove rtpplay.exe from the libwebrtc source folder
https://bugs.webkit.org/show_bug.cgi?id=209957

Reviewed by Eric Carlson.

  • .gitignore:
  • Source/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe: Removed.

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

10:53 AM Changeset in webkit [259471] by Alan Coon
  • 8 edits in branches/safari-610.1.8-branch/Source

Versioning.

10:43 AM Changeset in webkit [259470] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Remove unneeded sandbox access to some file paths
https://bugs.webkit.org/show_bug.cgi?id=209938
<rdar://problem/59529620>

Reviewed by Per Arne Vollan.

Remove unnecessary access to some locations in /etc. These may have been needed in
the past, but the WebContent process no longer requires this access. We should
remove it.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
10:37 AM Changeset in webkit [259469] by pvollan@apple.com
  • 5 edits in trunk

[iOS] Deny mach lookup access to the runningboard service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209933
Source/WebKit:

<rdar://problem/56995639>

Reviewed by Brent Fulgham.

On iOS, after <https://trac.webkit.org/changeset/258180/webkit>, mach lookup access to "com.apple.runningboard"
can be denied in the WebContent process.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

Reviewed by Brent Fulgham.

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
9:54 AM Changeset in webkit [259468] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebKit

REGRESSION(r259401): [GTK] Check surroundingRange is not null
https://bugs.webkit.org/show_bug.cgi?id=209966

Reviewed by Darin Adler & Philippe Normand.

  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::getPlatformEditorState const):

9:53 AM Changeset in webkit [259467] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove unused parameter from loadWithNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=209959

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-03
Reviewed by Darin Adler.

Remove unused parameter from loadWithNavigationAction.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/FrameLoader.h:
9:51 AM Changeset in webkit [259466] by ddkilzer@apple.com
  • 36 edits in trunk

[Xcode] Replace ASAN_OTHER_CFLAGS and ASAN_OTHER_CPLUSPLUSFLAGS with $(inherited)
<https://webkit.org/b/209963>
<rdar://problem/61257504>

Reviewed by Alexey Proskuryakov.

Source/bmalloc:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • Configurations/ToolExecutable.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/ThirdParty:

  • gtest/xcode/Config/General.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/ThirdParty/ANGLE:

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/ThirdParty/libwebrtc:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/WebCore:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/WebCore/PAL:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/WebKit:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/WebKitLegacy/mac:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Source/WTF:

  • Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.

Tools:

  • asan/asan.xcconfig:
  • Use $(inherited) to get rid of custom ASAN_OTHER_CFLAGS and ASAN_OTHER_CPLUSPLUSFLAGS. Note that ASAN_OTHER_LDFLAGS had been previously removed in r179312, but not in the other *.xcconfig files.
  • ContentExtensionTester/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • ImageDiff/cg/Configurations/Base.xcconfig:
  • MiniBrowser/Configurations/Base.xcconfig:
  • MobileMiniBrowser/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/Base.xcconfig:
  • WebEditingTester/Configurations/Base.xcconfig:
  • WebKitLauncher/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/Base.xcconfig:
  • lldb/lldbWebKitTester/Configurations/Base.xcconfig:
  • Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and ASAN_OTHER_LDFLAGS.
9:43 AM Changeset in webkit [259465] by wenson_hsieh@apple.com
  • 4 edits in trunk/Source

Add logging to help diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=209967

Reviewed by Darin Adler.

Source/WebCore:

Add logging to try and diagnose a handful of API test failures on iOS 13.4 test runners. The failures seem to
only reproduce in release builds on one particular bot; even then, the problem still doesn't reproduce when
running the API tests on this failing bot.

As such, add some logging to try and verify whether...
(1) the UI process is even attempting to update its supported item provider types, which should happen after

each drag session update.

(2) WKContentView is receiving calls to update the drag session in the first place.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard updateSupportedTypeIdentifiers:]):

Source/WebKit:

See WebCore/ChangeLog.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidUpdate:]):

9:26 AM Changeset in webkit [259464] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Improve error message when patch fails to apply to trunk
https://bugs.webkit.org/show_bug.cgi?id=209965

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ApplyPatch.getResultSummary): Improved error message.
(ApplyPatch.evaluateCommand): Ditto.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
8:58 AM Changeset in webkit [259463] by ysuzuki@apple.com
  • 28 edits in trunk/Source/JavaScriptCore

Unreviewed, partially reverting Structure change due to Speedometer2 regression
https://bugs.webkit.org/show_bug.cgi?id=207827

Not reverting WTF changes.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::createTransition):
(JSC::AccessCase::createDelete):
(JSC::AccessCase::propagateTransitions const):

  • bytecode/AccessCase.h:

(JSC::AccessCase::structure const):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCheckSubClass):
(JSC::DFG::SpeculativeJIT::compileObjectKeys):
(JSC::DFG::SpeculativeJIT::compileCreateThis):
(JSC::DFG::SpeculativeJIT::compileCreatePromise):
(JSC::DFG::SpeculativeJIT::compileCreateInternalFieldObject):

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

(JSC::FTL::DFG::LowerDFGToB3::compileObjectKeys):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
(JSC::FTL::DFG::LowerDFGToB3::loadStructureClassInfo): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::loadStructureCachedPrototypeChainOrRareData): Deleted.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitLoadClassInfoFromStructure): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_create_this):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_create_this):

  • jit/Repatch.cpp:

(JSC::tryCachePutByID):
(JSC::tryCacheDeleteBy):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createStructure):

  • runtime/ConcurrentJSLock.h:

(JSC::ConcurrentJSLockerBase::ConcurrentJSLockerBase):
(JSC::GCSafeConcurrentJSLocker::GCSafeConcurrentJSLocker):
(JSC::GCSafeConcurrentJSLocker::~GCSafeConcurrentJSLocker):
(JSC::ConcurrentJSLocker::ConcurrentJSLocker):
(JSC::GCSafeConcurrentJSLockerImpl::GCSafeConcurrentJSLockerImpl): Deleted.
(JSC::GCSafeConcurrentJSLockerImpl::~GCSafeConcurrentJSLockerImpl): Deleted.
(JSC::ConcurrentJSLockerImpl::ConcurrentJSLockerImpl): Deleted.

  • runtime/JSCell.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):
(JSC::JSObject::shiftButterflyAfterFlattening):

  • runtime/JSObject.h:

(JSC::JSObject::getDirectConcurrently const):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::prepareToPutDirectWithoutTransition):

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/Structure.cpp:

(JSC::StructureTransitionTable::contains const):
(JSC::StructureTransitionTable::get const):
(JSC::StructureTransitionTable::add):
(JSC::Structure::dumpStatistics):
(JSC::Structure::Structure):
(JSC::Structure::create):
(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::materializePropertyTable):
(JSC::Structure::addPropertyTransitionToExistingStructureImpl):
(JSC::Structure::addPropertyTransitionToExistingStructureConcurrently):
(JSC::Structure::addNewPropertyTransition):
(JSC::Structure::removePropertyTransitionFromExistingStructureConcurrently):
(JSC::Structure::removeNewPropertyTransition):
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::takePropertyTableOrCloneIfPinned):
(JSC::Structure::nonPropertyTransitionSlow):
(JSC::Structure::flattenDictionaryStructure):
(JSC::Structure::pin):
(JSC::Structure::pinForCaching):
(JSC::Structure::allocateRareData):
(JSC::Structure::ensurePropertyReplacementWatchpointSet):
(JSC::Structure::copyPropertyTableForPinning):
(JSC::Structure::add):
(JSC::Structure::remove):
(JSC::Structure::visitChildren):
(JSC::Structure::canCachePropertyNameEnumerator const):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::get):
(JSC::Structure::forEachPropertyConcurrently):
(JSC::Structure::transitivelyTransitionedFrom):
(JSC::Structure::prototypeChain const):
(JSC::Structure::propertyReplacementWatchpointSet):
(JSC::Structure::checkOffsetConsistency const):
(JSC::Structure::add):
(JSC::Structure::remove):
(JSC::Structure::removePropertyWithoutTransition):
(JSC::Structure::setPropertyTable):
(JSC::Structure::setPreviousID):
(JSC::Structure::ruleOutUnseenProperty const): Deleted.
(JSC::Structure::seenProperties const): Deleted.
(JSC::Structure::addPropertyHashAndSeenProperty): Deleted.
(JSC::Structure::cachedPrototypeChain const): Deleted.
(JSC::Structure::setCachedPrototypeChain): Deleted.
(JSC::Structure::clearPropertyTable): Deleted.
(JSC::Structure::setOutOfLineTypeFlags): Deleted.
(JSC::Structure::setInlineCapacity): Deleted.
(JSC::Structure::setClassInfo): Deleted.
(JSC::Structure::clearPreviousID): Deleted.

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::createStructure):
(JSC::StructureRareData::create):
(JSC::StructureRareData::StructureRareData):
(JSC::StructureRareData::visitChildren):

  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::setPreviousID):
(JSC::StructureRareData::clearPreviousID):
(JSC::StructureRareData::setCachedPrototypeChain): Deleted.

  • runtime/StructureTransitionTable.h:
  • tools/JSDollarVM.cpp:

(JSC::JSDollarVMHelper::functionGetStructureTransitionList):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

8:50 AM Changeset in webkit [259462] by sihui_liu@apple.com
  • 4 edits in trunk/LayoutTests

Flaky Test: storage/indexeddb/cursor-request-cycle.html
https://bugs.webkit.org/show_bug.cgi?id=209796
<rdar://problem/60171737>

Reviewed by Geoffrey Garen.

gc() does not guarantee all objects to be collected in our current implementation. So, instead of verifying all
cursor and request objects are released, we now only check if any of them is collected, which is enough to show
there is no ref cycle.

  • storage/indexeddb/cursor-request-cycle-expected.txt:
  • storage/indexeddb/cursor-request-cycle-private-expected.txt:
  • storage/indexeddb/resources/cursor-request-cycle.js:

(checkCursor):
(isAnyCollected):
(onOpen.otherRequest.onsuccess.otherRequestSuccess.finalRequest.onsuccess):
(onOpen.otherRequest.onsuccess):
(onOpen):
(onOpen.cursorRequest.onsuccess): Deleted.
(onOpen.otherRequest.onsuccess.otherRequestSuccess.cursorRequest.onsuccess): Deleted.

8:43 AM Changeset in webkit [259461] by sihui_liu@apple.com
  • 5 edits
    2 adds in trunk

ASSERTION FAILED: m_delegate in IDBConnectionToClient::identifier()
https://bugs.webkit.org/show_bug.cgi?id=209891
<rdar://problem/59293891>

Reviewed by Geoffrey Garen.

Source/WebCore:

IDBConnectionToClient::connectionToClientClosed() can lead UniqueIDBDatabase to start processing new requests,
and we should make sure it ignores the requests from the closed connection. Otherwise, the connection can be
held alive by the request being processed. We can do that by marking connection closed before calling
connectionToClientClosed on UniqueIDBDatabaseConnection.

API Test: IndexedDB.KillWebProcessWithOpenConnection

  • Modules/indexeddb/server/IDBConnectionToClient.cpp:

(WebCore::IDBServer::IDBConnectionToClient::connectionToClientClosed):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-1.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-2.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm:

(TEST):

8:21 AM Changeset in webkit [259460] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

ServiceWorkerFetchTask::timeoutTimerFired should not call contextClosed
https://bugs.webkit.org/show_bug.cgi?id=209906
<rdar://problem/61207801>

Reviewed by Chris Dumez.

Covered by http/tests/workers/service/basic-timeout.https.html no longer crashing.

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
We should not call contextClosed now that we are nullying m_swServerConnection in contextClosed.
Instead, we should just call cannotHandle since the timer can only fire if we have not yet received any response.

7:57 AM Changeset in webkit [259459] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

Unreviewed fix after r259382

Rubber-stamped by Carlos Garcia Campos.

No new tests needed.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_register_uri_scheme): Change g_return_if_fail()
calls to actually check that the passed scheme is not one of the
special ones.

7:35 AM Changeset in webkit [259458] by youenn@apple.com
  • 2 edits
    1 delete in trunk/Source/ThirdParty/libwebrtc

Remove rtpplay.exe from the libwebrtc source folder
https://bugs.webkit.org/show_bug.cgi?id=209957

Reviewed by Eric Carlson.

  • .gitignore:
  • Source/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe: Removed.
7:17 AM Changeset in webkit [259457] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Display list of test failures along-with the layout-test build step
https://bugs.webkit.org/show_bug.cgi?id=209912

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(RunWebKitTests._addToLog):
(RunWebKitTests.commandComplete): Add list of test failures to 'test-failures' log which is displayed in UI.
(ReRunWebKitTests.commandComplete): Ditto.
(RunWebKitTestsWithoutPatch.commandComplete): Ditto.

7:11 AM Changeset in webkit [259456] by Philippe Normand
  • 2 edits in trunk/Tools

REGRESSION(r259453): [Flatpak SDK] Build directory no longer bind-mounted when running tests
https://bugs.webkit.org/show_bug.cgi?id=209960

Reviewed by Carlos Alberto Lopez Perez.

The bind-mount is always needed, not only when running build-webkit.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

6:56 AM Changeset in webkit [259455] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[MultiColumn] Infinite loop in RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=209948
<rdar://problem/59331899>

Reviewed by Antti Koivisto.

Source/WebCore:

pushToNextPageWithMinimumLogicalHeight is supposed to find the next page/column with enough space for the content.
However we keep finding the same column because it is not balanced properly yet (while in layout, they have the initial height of LayoutUnit::max).

Test: fast/multicol/infinite-loop-with-unbalanced-column.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight const):

LayoutTests:

  • fast/multicol/infinite-loop-with-unbalanced-column-expected.txt: Added.
  • fast/multicol/infinite-loop-with-unbalanced-column.html: Added.
5:09 AM Changeset in webkit [259454] by commit-queue@webkit.org
  • 9 edits in trunk/JSTests

Re-enable previously skipped arm tests
https://bugs.webkit.org/show_bug.cgi?id=209958

Patch by Paulo Matos <Paulo Matos> on 2020-04-03
Reviewed by Adrian Perez de Castro.

In the past year, some arm tests were skipped to keep the bots green.
All known issues affecting these tests were fixed and now can be unskipped.

  • stress/JSArrayBufferView-byteOffset-is-racy-from-compiler-thread.js:
  • stress/dont-range-based-iterate-vector-that-is-mutated.js:
  • stress/generator-cell-with-type.js:
  • stress/incremental-marking-should-not-dead-lock-in-new-property-transition.js:
  • stress/racy-slow-put-cloned-arguments-when-having-a-bad-time.js:
  • stress/sampling-profiler-should-not-sample-beyond-stack-bounds.js:
  • stress/symbol-is-destructed-before-refing-underlying-symbol-impl.js:
  • stress/toctou-having-a-bad-time-new-array.js:
4:10 AM Changeset in webkit [259453] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[Flatpak SDK] Create platform/Release directory only when build-webkit is called
https://bugs.webkit.org/show_bug.cgi?id=209954

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.clean_args): Remove creation of self.build_path.
(WebkitFlatpak.run_in_sandbox): Create self.build_path if command is
build-webkit.

3:46 AM Changeset in webkit [259452] by youenn@apple.com
  • 55 edits
    4 copies
    25 adds in trunk

Add initial support for WebRTC HEVC
https://bugs.webkit.org/show_bug.cgi?id=204283

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Add H265 packetization/depacketization and ObjC H265 encoder/decoder.
Support is switchable using a boolean given to the decoder/encoder factories.

  • Source/webrtc/api/video/video_codec_type.h:
  • Source/webrtc/api/video_codecs/video_codec.cc:
  • Source/webrtc/api/video_codecs/video_codec.h:

(webrtc::VideoCodecH265::operator!= const):

  • Source/webrtc/api/video_codecs/video_encoder.cc:
  • Source/webrtc/api/video_codecs/video_encoder.h:
  • Source/webrtc/api/video_codecs/video_encoder_config.cc:
  • Source/webrtc/api/video_codecs/video_encoder_config.h:
  • Source/webrtc/build_overrides/build.gni:
  • Source/webrtc/call/rtp_payload_params.cc:
  • Source/webrtc/common_video/BUILD.gn:
  • Source/webrtc/common_video/h265/h265_common.cc: Added.
  • Source/webrtc/common_video/h265/h265_common.h: Added.
  • Source/webrtc/common_video/h265/h265_pps_parser.cc: Added.
  • Source/webrtc/common_video/h265/h265_pps_parser.h: Added.
  • Source/webrtc/common_video/h265/h265_sps_parser.cc: Added.
  • Source/webrtc/common_video/h265/h265_sps_parser.h: Added.
  • Source/webrtc/common_video/h265/h265_vps_parser.cc: Added.
  • Source/webrtc/common_video/h265/h265_vps_parser.h: Added.
  • Source/webrtc/media/base/media_constants.cc:
  • Source/webrtc/media/base/media_constants.h:
  • Source/webrtc/modules/rtp_rtcp/BUILD.gn:
  • Source/webrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc:
  • Source/webrtc/modules/rtp_rtcp/source/h265_sps_parser.cc: Added.
  • Source/webrtc/modules/rtp_rtcp/source/h265_sps_parser.h: Added.

(webrtc::H265SpsParser::width):
(webrtc::H265SpsParser::height):

  • Source/webrtc/modules/rtp_rtcp/source/rtp_format.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.cc: Added.
  • Source/webrtc/modules/rtp_rtcp/source/rtp_format_h265.h: Added.

(webrtc::RtpPacketizerH265::Packet::Packet):
(webrtc::RtpPacketizerH265::PacketUnit::PacketUnit):
(webrtc::VideoRtpDepacketizerH265::~VideoRtpDepacketizerH265):

  • Source/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_video_header.h:
  • Source/webrtc/modules/video_coding/BUILD.gn:
  • Source/webrtc/modules/video_coding/codecs/h265/include/h265_globals.h: Added.
  • Source/webrtc/modules/video_coding/encoded_frame.cc:
  • Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc: Added.
  • Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.h: Added.
  • Source/webrtc/modules/video_coding/include/video_codec_interface.h:
  • Source/webrtc/modules/video_coding/jitter_buffer_common.h:
  • Source/webrtc/modules/video_coding/packet.cc:
  • Source/webrtc/modules/video_coding/packet_buffer.cc:
  • Source/webrtc/modules/video_coding/session_info.cc:
  • Source/webrtc/modules/video_coding/session_info.h:
  • Source/webrtc/rtc_base/experiments/min_video_bitrate_experiment.cc:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::createWebKitEncoderFactory):
(webrtc::createWebKitDecoderFactory):

  • Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265+Private.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265.h: Added.
  • Source/webrtc/sdk/objc/components/video_codec/RTCCodecSpecificInfoH265.mm: Added.

(-[RTCCodecSpecificInfoH265 nativeCodecSpecificInfo]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m:

(-[RTCDefaultVideoDecoderFactory initWithH265:]):
(-[RTCDefaultVideoDecoderFactory supportedCodecs]):
(-[RTCDefaultVideoDecoderFactory createDecoder:]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m:

(-[RTCDefaultVideoEncoderFactory initWithH265:]):
(+[RTCDefaultVideoEncoderFactory supportedCodecs]):
(-[RTCDefaultVideoEncoderFactory createEncoder:]):
(-[RTCDefaultVideoEncoderFactory supportedCodecs]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCH265ProfileLevelId.mm: Added.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm: Added.

(RTCH265FrameDecodeParams::RTCH265FrameDecodeParams):
(h265DecompressionOutputCallback):
(-[RTCVideoDecoderH265 init]):
(-[RTCVideoDecoderH265 dealloc]):
(-[RTCVideoDecoderH265 startDecodeWithNumberOfCores:]):
(-[RTCVideoDecoderH265 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderH265 setCallback:]):
(-[RTCVideoDecoderH265 releaseDecoder]):
(-[RTCVideoDecoderH265 resetDecompressionSession]):
(-[RTCVideoDecoderH265 configureDecompressionSession]):
(-[RTCVideoDecoderH265 destroyDecompressionSession]):
(-[RTCVideoDecoderH265 setVideoFormat:]):
(-[RTCVideoDecoderH265 implementationName]):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.h: Copied from Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.h.
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.mm: Added.

(-[RTCVideoEncoderH265 initWithCodecInfo:]):
(-[RTCVideoEncoderH265 dealloc]):
(-[RTCVideoEncoderH265 startEncodeWithSettings:numberOfCores:]):
(-[RTCVideoEncoderH265 encode:codecSpecificInfo:frameTypes:]):
(-[RTCVideoEncoderH265 setCallback:]):
(-[RTCVideoEncoderH265 setBitrate:framerate:]):
(-[RTCVideoEncoderH265 releaseEncoder]):
(-[RTCVideoEncoderH265 resetCompressionSession]):
(-[RTCVideoEncoderH265 configureCompressionSession]):
(-[RTCVideoEncoderH265 destroyCompressionSession]):
(-[RTCVideoEncoderH265 implementationName]):
(-[RTCVideoEncoderH265 setBitrateBps:]):
(-[RTCVideoEncoderH265 setEncoderBitrateBps:]):
(-[RTCVideoEncoderH265 frameWasEncoded:flags:sampleBuffer:width:height:renderTimeMs:timestamp:rotation:]):
(-[RTCVideoEncoderH265 scalingSettings]):

  • Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc:
  • Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.h:
  • Source/webrtc/sdk/objc/native/src/objc_video_decoder_factory.mm:

(webrtc::ObjCVideoDecoderFactory::CreateVideoDecoder):

  • Source/webrtc/sdk/objc/native/src/objc_video_encoder_factory.mm:

(webrtc::ObjCVideoEncoderFactory::CreateVideoEncoder):

  • Source/webrtc/video/rtp_video_stream_receiver.cc:
  • Source/webrtc/video/rtp_video_stream_receiver.h:
  • Source/webrtc/video/send_statistics_proxy.cc:
  • Source/webrtc/video/video_receive_stream.cc:
  • Source/webrtc/video/video_stream_encoder.cc:
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Add a runtime flag for H265 in lieu of VP8 and pipe it to libwebrtc factories.
Test: webrtc/h265.html

  • page/Page.cpp:

(WebCore::m_deviceOrientationUpdateProvider):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webRTCH265CodecEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCH265CodecEnabled):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

Source/WebKit:

Remove VP8 runtime flag and add a H365 runtime flag instead.

  • Shared/WebPreferences.yaml:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

LayoutTests:

2:21 AM Changeset in webkit [259451] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] build-webkit --flatpak-cmakeargs option is ignored
https://bugs.webkit.org/show_bug.cgi?id=209648

Reviewed by Žan Doberšek.

This patch removes redundant options from webkit-flatpak,
correctly handles the cmakeargs option and reduces the amount of
flatpak list calls performed.

  • flatpak/flatpakutils.py:

(check_flatpak):
(FlatpakPackages.init):
(FlatpakPackage.is_installed):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.init):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.main):
(WebkitFlatpak.setup_dev_env):
(WebkitFlatpak.run_gdb):

2:13 AM Changeset in webkit [259450] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[Flatpak SDK] Call setup_icecc only if use_icecream is defined
https://bugs.webkit.org/show_bug.cgi?id=209956

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.setup_dev_env):

1:38 AM Changeset in webkit [259449] by yousuke.kimoto@sony.com
  • 4 edits in trunk/Source

FileSystem handle leaks in CurlCacheManager and NetworkCacheData when failed to open a file
https://bugs.webkit.org/show_bug.cgi?id=209949

Reviewed by Fujii Hironori.

A file handle of FileSystem is not closed when the file handle doesn't
return its status. The handle should be released before returning.

No new tests, no behavior change.

Source/WebCore:

  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::loadIndex):

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::mapFile):

12:24 AM Changeset in webkit [259448] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

stress/ftl-gettypedarrayoffset-wasteful.js times out on arm/linux
https://bugs.webkit.org/show_bug.cgi?id=198754

Patch by Paulo Matos <Paulo Matos> on 2020-04-03
Reviewed by Žan Doberšek.

Unskip test.

  • stress/ftl-gettypedarrayoffset-wasteful.js:
12:21 AM Changeset in webkit [259447] by Peng Liu
  • 6 edits in trunk/Source

WebCore::HTMLMediaElement::mediaCanStart crashes
https://bugs.webkit.org/show_bug.cgi?id=209950

Reviewed by Jer Noble.

Source/WebCore:

Use WeakHashSet instead of HashSet to record MediaCanStartListeners in Document.

  • dom/Document.cpp:

(WebCore::Document::addMediaCanStartListener):
(WebCore::Document::removeMediaCanStartListener):
(WebCore::Document::takeAnyMediaCanStartListener):

  • dom/Document.h:
  • page/MediaCanStartListener.h:

Source/WebKit:

UserMediaPermissionRequestManager does not need to inherit from
CanMakeWeakPtr<UserMediaPermissionRequestManager> because its
parent class MediaCanStartListener supports WeakPtr now.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
12:08 AM Changeset in webkit [259446] by Antti Koivisto
  • 3 edits in trunk/Tools

[Windows] Ignore render tree dump based results on Windows
https://bugs.webkit.org/show_bug.cgi?id=209897

Reviewed by Darin Adler.

Render tree dumps are port specific and so difficult to maintain. They are mostly very old and
have been superseded by more modern ref and text dump tests. They rarely reveal any port specific bugs.

This patch adds --ignore-render-tree-dump-results option to run-webkit-tests and enables it by
default on Apple Windows port.

With the option set the render tree dump tests are still run (so crashes are detected) but their
output is treated as if it always passed. Missing results are not written to disk.

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

(SingleTestRunner._compare_text):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):
(_set_up_derived_options):

12:04 AM Changeset in webkit [259445] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Flesh out enclosingScrollableArea() implementations
https://bugs.webkit.org/show_bug.cgi?id=209953

Reviewed by Timothy Hatcher.

enclosingScrollableArea() is a virtual function on ScrollableArea. It's currently
only called in an unused iOS WebKit1 code path, but will soon be used for scroll
latching, so flesh out implementations.

Will be tested by future scroll latching tests.

  • page/FrameView.cpp:

(WebCore::FrameView::enclosingScrollableArea const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::enclosingScrollableArea const):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::enclosingScrollableArea const):

Note: See TracTimeline for information about the timeline view.