Timeline
Jun 3, 2019:
- 11:36 PM Changeset in webkit [246056] by
-
- 16 edits5 adds in trunk
[Apple Pay] Disable script injection when canMakePayment APIs are called and return true
https://bugs.webkit.org/show_bug.cgi?id=198448
<rdar://problem/51323694>
Reviewed by Alex Christensen.
Source/WebCore:
Previously, only an active Apple Pay session would disable script injection in restricted
WKWebViews. However, this can result in websites rendering non-functional Apple Pay buttons
due to the race between the hosting app calling -evaluateJavaScript:completionHandler: and
the website calling canMakePayment APIs to determine whether to draw a button.
This patch makes it so that, if a website calls ApplePaySession's canMakePayments or
canMakePaymentsWithActiveCard, or PaymentRequest's canMakePayment, in a web view that has no
injected scripts, and those calls return true, future script injections from the hosting app
will be blocked.
Also, this patch removes the restrictions on the openPaymentSetup, supportsVersion, and
validatedPaymentNetwork APIs, since those APIs do not reveal transaction information and are
not used to determine whether to draw buttons.
Added new API tests.
- Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::supportsVersion const):
(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::openPaymentSetup):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::validatedPaymentNetwork const):
(WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const):
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
(WebCore::PaymentCoordinator::shouldAllowApplePay const): Deleted.
- Modules/applepay/PaymentCoordinator.h:
- dom/Document.cpp:
(WebCore::Document::isApplePayActive const):
(WebCore::Document::setApplePayIsActive):
(WebCore::Document::hasStartedApplePaySession const): Deleted.
(WebCore::Document::setHasStartedApplePaySession): Deleted.
- dom/Document.h:
- testing/Internals.cpp:
(WebCore::Internals::setApplePayIsActive):
(WebCore::Internals::setHasStartedApplePaySession): Deleted.
- testing/Internals.h:
- testing/Internals.idl:
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm:
(-[TestApplePayAvailableScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(-[TestApplePayActiveSessionScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::runActiveSessionTest):
(-[TestApplePayScriptMessageHandler initWithAPIsAvailableExpectation:canMakePaymentsExpectation:]): Deleted.
(-[TestApplePayScriptMessageHandler userContentController:didReceiveScriptMessage:]): Deleted.
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-active-session.html:
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-existing-object.html: Added.
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-in-iframe.html:
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability.html:
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payment.html: Added.
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments-with-active-card.html: Added.
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments.html: Added.
- TestWebKitAPI/Tests/WebKitCocoa/apple-pay.js: Added.
(applePayRequestBase):
(applePayPaymentRequest):
(applePayMethod):
- TestWebKitAPI/cocoa/TestProtocol.mm:
(-[TestProtocol startLoading]):
- 10:05 PM Changeset in webkit [246055] by
-
- 5 edits in branches/safari-608.1.27-branch
Cherry-pick r246042. rdar://problem/50667125
Tweak the text and underline color for data detected text.
https://bugs.webkit.org/show_bug.cgi?id=198487
rdar://problem/50667125
Reviewed by Devin Rousso.
Source/WebCore:
Tests: Color.RGBToHSL API tests
- editing/cocoa/DataDetection.mm: (WebCore::DataDetection::detectContentInRange): Use currentcolor so semantic text colors work. Force the lightness of the underline color to the middle, and multiply the alpha by 38%, so the color will appear on light and dark backgrounds, since only one color can be specified.
- platform/graphics/Color.cpp: (WebCore::Color::getHSL const): Return hue in [0...6) range to easily round-trip with makeRGBAFromHSLA().
Tools:
- TestWebKitAPI/Tests/WebCore/Color.cpp: (TestWebKitAPI::TEST): Added Color.RGBToHSL tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:01 PM Changeset in webkit [246054] by
-
- 7 edits in branches/safari-608.1.27-branch/Source
Versioning.
- 6:28 PM Changeset in webkit [246053] by
-
- 3 edits in trunk/Source/WebKit
[iOS] Do not prevent app suspension for more than 20 seconds after getting backgrounded
https://bugs.webkit.org/show_bug.cgi?id=198488
<rdar://problem/50837208>
Reviewed by Geoff Garen.
Do not prevent app suspension for more than 20 seconds after getting backgrounded on iOS. We
do this by implementing our own expiration handler which notifies our child processes of
their imminent suspension before ending the background task that was preventing suspension.
- UIProcess/ios/ProcessAssertionIOS.mm:
(isBackgroundState):
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _scheduleTimeoutTask]):
(-[WKProcessAssertionBackgroundTaskManager _cancelTimeoutTask]):
(-[WKProcessAssertionBackgroundTaskManager _backgroundTaskExpired]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):
- 5:25 PM Changeset in webkit [246052] by
-
- 4 edits in trunk/Source/WebCore
[WHLSL] Parsing and lexing the standard library is slow
https://bugs.webkit.org/show_bug.cgi?id=192890
<rdar://problem/50746335>
Reviewed by Myles Maxfield.
The main idea is to avoid backtracking by instead peeking at the next token (and occasionally at the one after that).
This implies a few things:
- We can replace the stack of tokens by a trivial ring buffer of size 2 (holding the next token and the one after, or WTF::nullopt if we are at the end of the file).
- We now have "completeFooExpression" functions, to avoid having to reparse the prefix of some expression, if we find half-way through what it is.
I also fixed the following parser bug:
- https://bugs.webkit.org/show_bug.cgi?id=198305 [WHLSL] Multiple variables with initializers in a declaration statement crashes the compiler
which was due to a mistake I made in the grammar
Finally I added two new macros: CONSUME_TYPE and PARSE to eliminate about 500 lines of error propagation boilerplate.
There are still lots of ways of improving the parser and lexer, such as:
- finishing the conversion of tokens in the lexer, not bothering with allocating string views
- make two special tokens Invalid and EOF, to remove the overhead of Optional
- make peekTypes and consumeTypes use templates to avoid constructing a Vector and calling find on it.
- Turn the entire lexer into a proper automata, not going through the same characters again and again (this is certainly the largest win by far)
- Remove the last few pieces of backtracking from the parser.
The current patch is already enough to make parsing the full standard library (something like 85k lines) approximately 260ms.
This is still longer than I would like, but nowhere near the bottleneck any longer because of some other parts of the compiler.
- Modules/webgpu/WHLSL/WHLSLLexer.h:
(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::peek):
(WebCore::WHLSL::Lexer::peekFurther):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::unconsumeToken): Deleted.
- Modules/webgpu/WHLSL/WHLSLParser.cpp:
(WebCore::WHLSL::Parser::parse):
(WebCore::WHLSL::Parser::peek):
(WebCore::WHLSL::Parser::peekTypes):
(WebCore::WHLSL::Parser::tryType):
(WebCore::WHLSL::Parser::tryTypes):
(WebCore::WHLSL::Parser::consumeTypes):
(WebCore::WHLSL::Parser::parseConstantExpression):
(WebCore::WHLSL::Parser::parseTypeArgument):
(WebCore::WHLSL::Parser::parseTypeArguments):
(WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
(WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
(WebCore::WHLSL::Parser::parseType):
(WebCore::WHLSL::Parser::parseTypeDefinition):
(WebCore::WHLSL::Parser::parseResourceSemantic):
(WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
(WebCore::WHLSL::Parser::parseStageInOutSemantic):
(WebCore::WHLSL::Parser::parseSemantic):
(WebCore::WHLSL::Parser::parseQualifiers):
(WebCore::WHLSL::Parser::parseStructureElement):
(WebCore::WHLSL::Parser::parseStructureDefinition):
(WebCore::WHLSL::Parser::parseEnumerationDefinition):
(WebCore::WHLSL::Parser::parseEnumerationMember):
(WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
(WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
(WebCore::WHLSL::Parser::parseAttributeBlock):
(WebCore::WHLSL::Parser::parseParameter):
(WebCore::WHLSL::Parser::parseParameters):
(WebCore::WHLSL::Parser::parseFunctionDefinition):
(WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseVertexFragmentFunctionDeclaration):
(WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
(WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
(WebCore::WHLSL::Parser::parseFunctionDeclaration):
(WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseBlock):
(WebCore::WHLSL::Parser::parseBlockBody):
(WebCore::WHLSL::Parser::parseIfStatement):
(WebCore::WHLSL::Parser::parseSwitchStatement):
(WebCore::WHLSL::Parser::parseSwitchCase):
(WebCore::WHLSL::Parser::parseForLoop):
(WebCore::WHLSL::Parser::parseWhileLoop):
(WebCore::WHLSL::Parser::parseDoWhileLoop):
(WebCore::WHLSL::Parser::parseVariableDeclaration):
(WebCore::WHLSL::Parser::parseVariableDeclarations):
(WebCore::WHLSL::Parser::parseStatement):
(WebCore::WHLSL::Parser::parseEffectfulExpression):
(WebCore::WHLSL::Parser::parseEffectfulAssignment):
(WebCore::WHLSL::Parser::parseExpression):
(WebCore::WHLSL::Parser::parseTernaryConditional):
(WebCore::WHLSL::Parser::completeTernaryConditional):
(WebCore::WHLSL::Parser::parseAssignment):
(WebCore::WHLSL::Parser::completeAssignment):
(WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
(WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleShift):
(WebCore::WHLSL::Parser::completePossibleShift):
(WebCore::WHLSL::Parser::parsePossibleAdd):
(WebCore::WHLSL::Parser::completePossibleAdd):
(WebCore::WHLSL::Parser::parsePossibleMultiply):
(WebCore::WHLSL::Parser::completePossibleMultiply):
(WebCore::WHLSL::Parser::parsePossiblePrefix):
(WebCore::WHLSL::Parser::parsePossibleSuffix):
(WebCore::WHLSL::Parser::parseCallExpression):
(WebCore::WHLSL::Parser::parseTerm):
(WebCore::WHLSL::Parser::parseAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseNonAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulPrefix): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulSuffix): Deleted.
- Modules/webgpu/WHLSL/WHLSLParser.h:
(WebCore::WHLSL::Parser::Error::dump const):
- 2:59 PM Changeset in webkit [246051] by
-
- 1 copy in tags/Safari-608.1.27.1
Tag Safari-608.1.27.1.
- 2:10 PM Changeset in webkit [246050] by
-
- 2 edits in trunk/Tools
[ Mac WK2 ] TestWebKitAPI.WKWebView.LocalStorageProcessCrashes is a flaky timeout when run locally.
https://bugs.webkit.org/show_bug.cgi?id=198423
<rdar://problem/51305247>
Reviewed by Youenn Fablet.
IDBDatabase receives error event on network process crash, so we don't need to check it periodically.
- TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-crashes.html:
- 2:07 PM Changeset in webkit [246049] by
-
- 7 edits2 adds in trunk
Allow resizing of camera video feeds to very small resolutions
https://bugs.webkit.org/show_bug.cgi?id=198421
Reviewed by Alex Christensen.
Source/WebCore:
Before the patch, the minimum capture resolution was set to 120.
Since this is a bit arbitrary and there are some use cases for lower resolution,
We now allow down to 1x1 resolution.
Test: fast/mediastream/getUserMedia-video-rescaling.html
- platform/mediastream/RealtimeVideoSource.cpp:
(WebCore::RealtimeVideoSource::updateCapabilities):
Allow 1x1 when computing min/max resolutions.
(WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
In case width and height are provided, we pick the closest preset that matches and resize accordingly.
If width or height is provided, we pick the closest preset tat matches and applies its aspect ratio.
LayoutTests:
Update tests to expect 1x1 minimum capture resolution.
- fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
- fast/mediastream/apply-constraints-video-expected.txt:
- fast/mediastream/apply-constraints-video.html:
- fast/mediastream/get-user-media-constraints-expected.txt:
- fast/mediastream/getUserMedia-video-rescaling-expected.txt: Added.
- fast/mediastream/getUserMedia-video-rescaling.html: Added.
- 2:07 PM Changeset in webkit [246048] by
-
- 12 edits1 copy in trunk/Source
Implement an internal switch to turn idempotent text autosizing and viewport rules off
https://bugs.webkit.org/show_bug.cgi?id=198460
<rdar://problem/51324526>
Reviewed by Tim Horton.
Source/WebCore:
Add a new WebCore setting for viewport shrink-to-fit-content heuristics; additionally, tweak the existing
idempotent text autosizing setting to default to false (this is overridden by preferences at the WebKit layer).
- page/Settings.yaml:
Source/WebKit:
- Shared/WebPreferences.yaml:
Add new preferences to control viewport shrink-to-fit-content and idempotent text autosizing.
- Shared/WebPreferencesDefaultValues.cpp:
Add the non-iOS implementation of defaultTextAutosizingUsesIdempotentMode, and also wrap these functions in the
WebKit namespace.
(WebKit::defaultTextAutosizingUsesIdempotentMode):
(defaultPassiveTouchListenersAsDefaultOnDocument): Deleted.
(defaultCustomPasteboardDataEnabled): Deleted.
- Shared/WebPreferencesDefaultValues.h:
Move some existing default preference value helper functions into the WebKit namespace.
- Shared/ios/WebPreferencesDefaultValuesIOS.mm: Copied from Source/WebKit/Shared/WebPreferencesDefaultValues.cpp.
Add an iOS-specific file for WebPreferencesDefaultValues, so that we can check for the user interface idiom.
(WebKit::defaultTextAutosizingUsesIdempotentMode):
- SourcesCocoa.txt:
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::immediatelyShrinkToFitContent):
Add an early return for the case where shrink-to-fit-content is explicitly disabled via the new preference.
- 2:04 PM Changeset in webkit [246047] by
-
- 3 edits in branches/safari-607-branch/Source/WebCore
Revert r246001. rdar://problem/50871594
- 1:58 PM Changeset in webkit [246046] by
-
- 6 edits in trunk
Web Inspector: remove RemoteObject.prototype.getPropertyDescriptorsAsObject
https://bugs.webkit.org/show_bug.cgi?id=198395
Reviewed by Matt Baker.
Source/WebInspectorUI:
When calling
RemoteObject.prototype.getPropertyDescriptorsAsObject, if one of the returned
property descriptors is named__proto__, it will replace the__proto__of the plain
object created for that function with theWI.PropertyDescriptoritself, altering the
prototype chain.
- UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.getPropertyDescriptorsAsObject): Deleted.
- UserInterface/Models/AuditTestCase.js:
(WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach):
- UserInterface/Views/ErrorObjectView.js:
(WI.ErrorObjectView.prototype.update):
LayoutTests:
- inspector/runtime/awaitPromise.html:
- 1:49 PM Changeset in webkit [246045] by
-
- 25 edits32 adds in trunk
Implement imagesrcset and imagesizes attributes on link rel=preload
https://bugs.webkit.org/show_bug.cgi?id=192950
Patch by Rob Buis <rbuis@igalia.com> on 2019-06-03
Reviewed by Youenn Fablet.
LayoutTests/imported/w3c:
Import relevant tests for this feature.
- web-platform-tests/preload/dynamic-adding-preload-imagesrcset-expected.txt: Added.
- web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html: Added.
- web-platform-tests/preload/link-header-preload-expected.txt: Added.
- web-platform-tests/preload/link-header-preload-imagesrcset-expected.txt: Added.
- web-platform-tests/preload/link-header-preload-imagesrcset.html: Added.
- web-platform-tests/preload/link-header-preload-imagesrcset.html.headers: Added.
- web-platform-tests/preload/link-header-preload-nonce-expected.txt: Added.
- web-platform-tests/preload/link-header-preload-nonce.html: Added.
- web-platform-tests/preload/link-header-preload-nonce.html.headers: Added.
- web-platform-tests/preload/link-header-preload.html: Added.
- web-platform-tests/preload/link-header-preload.html.headers: Added.
- web-platform-tests/preload/onload-event-expected.txt: Added.
- web-platform-tests/preload/onload-event.html: Added.
- web-platform-tests/preload/preload-csp.sub-expected.txt:
- web-platform-tests/preload/preload-csp.sub.html:
- web-platform-tests/preload/preload-default-csp.sub-expected.txt:
- web-platform-tests/preload/preload-default-csp.sub.html:
- web-platform-tests/preload/preload-with-type-expected.txt: Added.
- web-platform-tests/preload/preload-with-type.html: Added.
- web-platform-tests/preload/resources/A4.ogv: Added.
- web-platform-tests/preload/resources/A4.ogv.sub.headers: Added.
- web-platform-tests/preload/resources/cross-origin-module.py: Added.
(main):
- web-platform-tests/preload/resources/dummy-preloads-subresource.css: Added.
- web-platform-tests/preload/resources/dummy-preloads-subresource.css.sub.headers: Added.
- web-platform-tests/preload/resources/empty.html: Added.
- web-platform-tests/preload/resources/empty.html.sub.headers: Added.
- web-platform-tests/preload/resources/foo.vtt.sub.headers: Added.
- web-platform-tests/preload/resources/module1.js: Added.
- web-platform-tests/preload/resources/module2.js: Added.
- web-platform-tests/preload/resources/preload_helper.js:
(verifyNumberOfResourceTimingEntries):
(numberOfResourceTimingEntries):
Source/WebCore:
Implement imagesrcset and imagesizes attributes for both Link header
and link element.
Tests: imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset.html
imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset.html
imported/w3c/web-platform-tests/preload/link-header-preload-nonce.html
imported/w3c/web-platform-tests/preload/link-header-preload.html
imported/w3c/web-platform-tests/preload/onload-event.html
imported/w3c/web-platform-tests/preload/preload-with-type.html
- html/HTMLAttributeNames.in:
- html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
- html/HTMLLinkElement.idl:
- loader/LinkHeader.cpp:
(WebCore::paramterNameFromString):
(WebCore::LinkHeader::setValue):
(WebCore::LinkHeader::LinkHeader):
- loader/LinkHeader.h:
(WebCore::LinkHeader::imageSrcSet const):
(WebCore::LinkHeader::imageSizes const):
(WebCore::LinkHeader::isViewportDependent const):
- loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader):
(WebCore::LinkLoader::preloadIfNeeded):
(WebCore::LinkLoader::loadLink):
- loader/LinkLoader.h:
- page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::linkPreloadResponsiveImagesEnabled const):
(WebCore::RuntimeEnabledFeatures::setLinkPreloadResponsiveImagesEnabled):
Source/WebKit:
Add a runtime flag for link preload responsive images.
- Shared/WebPreferences.yaml:
Source/WebKitLegacy/mac:
Add a runtime flag for link preload responsive images.
- WebView/WebPreferenceKeysPrivate.h:
- WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences linkPreloadResponsiveImagesEnabled]):
(-[WebPreferences setLinkPreloadResponsiveImagesEnabled:]):
- WebView/WebPreferencesPrivate.h:
- WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Tools:
Add a runtime flag for link preload responsive images.
- DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
LayoutTests:
Write special expectation for link-header-preload-imagesrcset.html because test runner
uses different dimensions on iOS.
- platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/dynamic-adding-preload-imagesrcset-expected.txt: Added.
- platform/ios-simulator-12-wk2/imported/w3c/web-platform-tests/preload/link-header-preload-imagesrcset-expected.txt: Added.
- 1:12 PM Changeset in webkit [246044] by
-
- 6 edits1 add in trunk/Tools
[CMake] Use WEBKIT_EXECUTABLE in ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=198490
Reviewed by Konstantin Tokarev.
Use WEBKIT_EXECUTABLE in ImageDiff. Change CMake variables to use the proper
convention. Add a shared CoreGraphics.cmake instead of just including PlatformMac
for AppleWin builds.
- ImageDiff/CMakeLists.txt:
- ImageDiff/Cairo.cmake:
- ImageDiff/CoreGraphics.cmake: Added.
- ImageDiff/PlatformGTK.cmake:
- ImageDiff/PlatformMac.cmake:
- ImageDiff/PlatformWin.cmake:
- 12:39 PM Changeset in webkit [246043] by
-
- 6 edits in trunk
Memory-cached main resources continue to load after the client decides a content policy of PolicyAction::Download
https://bugs.webkit.org/show_bug.cgi?id=198469
<rdar://problem/50512713>
Reviewed by Youenn Fablet.
Source/WebCore:
When a document is loaded from the memory cache it does not have a main resource loader, but
DocumentLoader::continueAfterContentPolicy relies on being able to call
ResourceLoader::didFail on the main resource loader to cancel the provisional navigation
when the client decides a content policy of PolicyAction::Download.
This means that memory-cached main resources continue to load even after WebKit has started
to download the main resource. The expected behavior is for the provisional navigation to
fail once the download starts, like what happens when there is a main resource loader.
This patch teaches DocumentLoader::continueAfterContentPolicy to call
stopLoadingForPolicyChange() in the case of a null main resource loader. This will dispatch
didFailProvisionalNavigation and remove the DocumentLoader as a client of its
CachedRawResource to prevent it from delivering any cached data.
Added a new API test.
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didStartProvisionalNavigation:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didFailProvisionalNavigation:withError:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didFinishNavigation:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate _downloadDidStart:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TEST):
- TestWebKitAPI/cocoa/TestProtocol.h:
- TestWebKitAPI/cocoa/TestProtocol.mm:
(+[TestProtocol additionalResponseHeaders]):
(+[TestProtocol setAdditionalResponseHeaders:]):
(-[TestProtocol startLoading]):
- 12:14 PM Changeset in webkit [246042] by
-
- 5 edits in trunk
Tweak the text and underline color for data detected text.
https://bugs.webkit.org/show_bug.cgi?id=198487
rdar://problem/50667125
Reviewed by Devin Rousso.
Source/WebCore:
Tests: Color.RGBToHSL API tests
- editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange): Use currentcolor so semantic text colors work.
Force the lightness of the underline color to the middle, and multiply the alpha by 38%,
so the color will appear on light and dark backgrounds, since only one color can be specified.
- platform/graphics/Color.cpp:
(WebCore::Color::getHSL const): Return hue in [0...6) range to easily round-trip with makeRGBAFromHSLA().
Tools:
- TestWebKitAPI/Tests/WebCore/Color.cpp:
(TestWebKitAPI::TEST): Added Color.RGBToHSL tests.
- 11:42 AM Changeset in webkit [246041] by
-
- 22 edits9 adds in trunk
[ESNext][BigInt] Implement support for ""
https://bugs.webkit.org/show_bug.cgi?id=190799
Reviewed by Saam Barati.
JSTests:
- stress/big-int-exp-basic.js: Added.
- stress/big-int-exp-jit-osr.js: Added.
- stress/big-int-exp-jit-untyped.js: Added.
- stress/big-int-exp-jit.js: Added.
- stress/big-int-exp-negative-exponent.js: Added.
- stress/big-int-exp-to-primitive.js: Added.
- stress/big-int-exp-type-error.js: Added.
- stress/big-int-exp-wrapped-value.js: Added.
- stress/value-pow-ai-rule.js: Added.
Source/JavaScriptCore:
We are introducing support for BigInt into "" operator. This Patch
also includes changes into DFG, introducing a new node "ValuePow" that
is responsible to handle UntypedUse and BigIntUse.
- dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
ValuePow(Untyped, Untyped) still can propagate constant if AI proves
it. We are doing so if AI proves rhs and lhs as numbers.
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
When compiling op_pow, we first verify if rhs and lhs can be any Int
or number. If this happen, we emit ArithPow, otherwise we fallback to
ValuePow and rely on fixup to convert it to ArithPow if possible.
- dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
We only clobberize world if ValuePow is UntypedUse. Otherwise, we can
properly support CSE.
- dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
JSBigInt::exponentiate allocates JSBigInts to perform calculation and
it can trigger GC. ValuePow(UntypedUse) can trigger GC because it can
execute user code.
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupArithPow):
(JSC::DFG::FixupPhase::fixupNode):
- dfg/DFGNodeType.h:
- dfg/DFGOperations.cpp:
- dfg/DFGOperations.h:
- dfg/DFGPredictionPropagationPhase.cpp:
- dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValuePow):
- dfg/DFGSpeculativeJIT.h:
- dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGValidate.cpp:
- ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValuePow):
- runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
We are adding proper support to BigInt on op_pow. The specification
defines that we can only apply pow when both operands have the same
type after calling ToNumeric().
- runtime/JSBigInt.cpp:
(JSC::JSBigInt::exponentiate):
- runtime/JSBigInt.h:
- 11:27 AM Changeset in webkit [246040] by
-
- 4 edits3 adds in trunk
[JSC] JSObject::attemptToInterceptPutByIndexOnHole should use getPrototype instead of getPrototypeDirect
https://bugs.webkit.org/show_bug.cgi?id=198477
<rdar://problem/51299504>
Reviewed by Saam Barati.
Source/JavaScriptCore:
JSObject::attemptToInterceptPutByIndexOnHole uses getPrototypeDirect, but it should use getPrototype to
handle getPrototype methods in derived JSObject classes correctly.
- runtime/JSArrayInlines.h:
(JSC::JSArray::pushInline):
- runtime/JSObject.cpp:
(JSC::JSObject::putByIndex):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::putByIndexBeyondVectorLength):
LayoutTests:
Ensure that JSWindow::getPrototype is used.
- http/tests/security/cross-frame-access-object-getPrototypeOf-in-put-expected.txt: Added.
- http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html: Added.
- http/tests/security/resources/cross-frame-iframe-for-object-getPrototypeOf-in-put-test.html: Added.
- 10:04 AM Changeset in webkit [246039] by
-
- 17 edits in trunk
[CMake] Add WebKit::JavaScriptCore target
https://bugs.webkit.org/show_bug.cgi?id=198403
Reviewed by Konstantin Tokarev.
Source/JavaScriptCore:
Create the WebKit::JavaScriptCore target and use that to propagate headers. Use
WEBKIT_COPY_FILES instead of WEBKIT_MAKE_FORWARDING_HEADERS.
- CMakeLists.txt:
- shell/CMakeLists.txt:
Source/WebCore:
Use the WebKit::JavaScriptCore target.
- CMakeLists.txt:
Source/WebCore/PAL:
Use the WebKit::JavaScriptCore target.
- pal/CMakeLists.txt:
Source/WebKitLegacy:
Use the WebKit::JavaScriptCore target.
- CMakeLists.txt:
Tools:
Use the WebKit::JavaScriptCore target.
- DumpRenderTree/CMakeLists.txt:
- MiniBrowser/win/CMakeLists.txt:
- TestWebKitAPI/CMakeLists.txt:
- TestWebKitAPI/PlatformGTK.cmake:
- TestWebKitAPI/PlatformWPE.cmake:
- TestWebKitAPI/glib/CMakeLists.txt:
- WebKitTestRunner/CMakeLists.txt:
- 9:48 AM Changeset in webkit [246038] by
-
- 9 edits in trunk/Source
Unreviewed, rolling out r246022.
https://bugs.webkit.org/show_bug.cgi?id=198486
Causing Internal build failures and JSC test failures
(Requested by ShawnRoberts on #webkit).
Reverted changeset:
"Reenable Gigacage on ARM64."
https://bugs.webkit.org/show_bug.cgi?id=198453
https://trac.webkit.org/changeset/246022
- 9:37 AM Changeset in webkit [246037] by
-
- 2 edits in trunk/LayoutTests
Flaky Test: inspector/canvas/recording.html
https://bugs.webkit.org/show_bug.cgi?id=198470
Reviewed by Timothy Hatcher.
- inspector/canvas/recording.html:
The ordering of <canvas> in
WI.canvasManager.canvasesisn't always the same, so we should
perform the action on every <canvas> since we know we'll be recording at least one of them.
- 8:34 AM Changeset in webkit [246036] by
-
- 2 edits in trunk/Source/WebCore
[Nicosia] Disable async scrolling until implemented
https://bugs.webkit.org/show_bug.cgi?id=198476
<rdar://problem/51351478>
Unreviewed follow-up to r246033.
- page/scrolling/ScrollingCoordinator.cpp:
Expand the PLATFORM(IOS) guard to IOS_FAMILY.
- 7:28 AM Changeset in webkit [246035] by
-
- 3 edits in trunk/Source/WebDriver
REGRESSION(r245567): [GTK][WPE] [2.25.1] WebKitWebDriver gets installed as WebDriver
https://bugs.webkit.org/show_bug.cgi?id=198480
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-06-03
Reviewed by Michael Catanzaro.
We are now using the WEBKIT_EXECUTABLE macro that uses target_OUTPUT_NAME variable, but we define
taget_Process_OUTPUT_NAME.
- PlatformGTK.cmake:
- PlatformWPE.cmake:
- 4:34 AM Changeset in webkit [246034] by
-
- 30 edits in trunk
Finish cleanup of String::number for floating point
https://bugs.webkit.org/show_bug.cgi?id=198471
Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:
- dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode): Use String::number instead of
String::numberToStringECMAScript, since that's now the default.
- parser/ParserArena.h:
(JSC::IdentifierArena::makeNumericIdentifier): Ditto.
- runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue): Use appendNumber instead of
builder.appendECMAScriptNumber, since that's now the default.
- runtime/NumberPrototype.cpp:
(JSC::toStringWithRadix): Use String::number instead of
String::numberToStringECMAScript, since that's now the default.
(JSC::numberProtoFuncToExponential): Ditto.
(JSC::numberProtoFuncToFixed): Ditto.
(JSC::numberProtoFuncToPrecision): Ditto.
(JSC::numberToStringInternal): Ditto.
- runtime/NumericStrings.h:
(JSC::NumericStrings::add): Ditto.
- wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::prepare): Ditto.
Source/WebCore:
- css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::customCSSText const): Use makeString instead
of StringBuilder since it is more terse and possibly more efficient as well.
- css/DOMMatrixReadOnly.cpp:
(WebCore::DOMMatrixReadOnly::toString const): Ditto.
- css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::toString const): Ditto.
- html/parser/HTMLParserIdioms.cpp:
(WebCore::serializeForNumberType): Use String::number instead of
String::numberToStringECMAScript since that is now the default.
- html/shadow/MediaControlElementTypes.cpp:
(WebCore::MediaControlVolumeSliderElement::setVolume): Ditto.
- html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::setPosition): Ditto.
- platform/Decimal.cpp:
(WebCore::Decimal::fromDouble): Ditto.
- rendering/RenderListMarker.cpp:
(WebCore::toRoman): Return a String instead of taking a StringBuilder argument.
Use LetterCase enum instead of bool for the uppercase vs. lowercase argument, to
be less mysterious at call sites. Use unsigned for string lengths since that's
what WTF::String uses.
(WebCore::toAlphabeticOrNumeric): Ditto. Also updated since SequenceType is now
an enum class.
(WebCore::toSymbolic): Use String::createUninitialized instead of StringBuilder.
Return a String instead of taking a StringBuilder argument. Straighten out the
algorithm so it's easier to understand.
(WebCore::toAlphabetic): Updated since SequenceType is now an enum class.
(WebCore::toNumeric): Ditto.
(WebCore::toHebrew): Return a String instead of taking a StringBuilder argument.
Use unsigned for string lengths since that's what WTF::String uses.
(WebCore::toArmenianUnder10000): Use unsigned and the LetterCase enum class.
(WebCore::toArmenian): Return a String instead of taking a StringBuilder argument.
Also use unsigned for string lengths since that's what WTF::String uses.
(WebCore::toGeorgian): Ditto.
(WebCore::toCJKIdeographic): Ditto.
(WebCore::listMarkerSuffix): Tweaked a comment.
(WebCore::listMarkerText): Use String return values instead of StringBuilder.
(WebCore::RenderListMarker::paint): Use String::createUninitialized instead of
StringBuilder since it's a bit more efficient. Use makeString instead of turning
single characters into strings since that's more efficient.
- svg/SVGPathUtilities.cpp:
(WebCore::buildStringFromPath): Use appendNumber instead of appendShortestFormNumber
since that is now the default.
Source/WebKit:
- NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::submitTopList): Use makeString instead of StringBuilder since it
is more terse and possibly more efficient as well.
- UIProcess/API/APIUserScript.cpp:
(API::UserScript::generateUniqueURL): Ditto.
- UIProcess/API/APIUserStyleSheet.cpp:
(API::UserStyleSheet::generateUniqueURL): Ditto.
Source/WTF:
- wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::writeJSON const): Use appendNumber instead of
appendECMAScriptNumber, since that's now the default.
- wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendNumber): Renamed from appendShortestFormNumber.
- wtf/text/StringBuilder.h: Removed appendShortestFormNumber and
appendECMAScriptNumber, replacing both with overload of appendNumber.
- wtf/text/WTFString.cpp:
(WTF::String::number): Renamed from numberToStringShortest.
- wtf/text/WTFString.h: Removed numberToStringShortest and
numberToStringECMAScript, replacing both with overload of number.
Tools:
- TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::testStringNumber): Go back to calling String::number instead of
String::numberToStringECMAScript.
- WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::dumpFrameScrollPosition): Use appendNumber instead of appendECMAScriptNumber
since that is now the default.
- 2:45 AM Changeset in webkit [246033] by
-
- 24 edits in trunk
[Nicosia] Disable async scrolling until implemented
https://bugs.webkit.org/show_bug.cgi?id=198476
Reviewed by Antti Koivisto.
.:
Disable async scrolling on Nicosia-using ports until the underlying
implementation is complete, allowing easier refactorings of the general
async scrolling system.
- Source/cmake/OptionsGTK.cmake:
- Source/cmake/OptionsPlayStation.cmake:
- Source/cmake/OptionsWPE.cmake:
Source/WebCore:
Build ScrollingCoordinator::create() method on iOS or whenever
ASYNC_SCROLLING is not enabled.
Additionally, the USE(COORDINATED_GRAPHICS) build guards are removed
throughout the async scrolling classes as they aren't required now
and shouldn't be in the future.
- page/scrolling/ScrollingCoordinator.cpp:
- page/scrolling/ScrollingStateFixedNode.cpp:
- page/scrolling/ScrollingStateFixedNode.h:
- page/scrolling/ScrollingStateFrameHostingNode.cpp:
- page/scrolling/ScrollingStateFrameHostingNode.h:
- page/scrolling/ScrollingStateFrameScrollingNode.cpp:
- page/scrolling/ScrollingStateFrameScrollingNode.h:
- page/scrolling/ScrollingStateNode.cpp:
- page/scrolling/ScrollingStateNode.h:
- page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
- page/scrolling/ScrollingStateOverflowScrollingNode.h:
- page/scrolling/ScrollingStatePositionedNode.cpp:
- page/scrolling/ScrollingStatePositionedNode.h:
- page/scrolling/ScrollingStateScrollingNode.cpp:
- page/scrolling/ScrollingStateScrollingNode.h:
- page/scrolling/ScrollingStateStickyNode.cpp:
- page/scrolling/ScrollingStateStickyNode.h:
- page/scrolling/ScrollingStateTree.cpp:
- page/scrolling/ScrollingStateTree.h:
- 2:43 AM Changeset in webkit [246032] by
-
- 2 edits in trunk/Source/WebKit
REGRESSION(r240862) [WinCairo][WK2] position:fixed elements don't show
https://bugs.webkit.org/show_bug.cgi?id=198478
Reviewed by Carlos Garcia Campos.
All position:fixed elements didn't show in WinCairo WebKit2 since
r240862 which turns acceleratedCompositingEnabled on for WebKit2.
WinCairo WebKit2 doesn't have accelerated compositing support yet.
Let's do the same with GTK port.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Conditioned out the code
enabling acceleratedCompositingEnabled for PLATFORM(WIN).
- 2:29 AM Changeset in webkit [246031] by
-
- 2 edits in trunk/Source/WebCore
[Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation
https://bugs.webkit.org/show_bug.cgi?id=198191
Unreviewed post-commit review feedback suggested by Darin Adler.
- page/PointerCaptureController.cpp:
(WebCore::PointerCaptureController::reset):
- 1:07 AM Changeset in webkit [246030] by
-
- 3 edits in trunk/Source/WebKit
REGRESSION(r244182): [CoordinatedGraphics] Related view doesn't receive graphic updates
https://bugs.webkit.org/show_bug.cgi?id=198418
Reviewed by Žan Doberšek.
This is because we need a DisplayRefreshMonitor per drawing area, but the one from the first ThreradedCompositor
is always reused because they use the same display ID.
- WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Use a unique display ID derived from
WebPage's ID.
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode): Use the primary display ID.
- WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::LayerTreeHost): Get the current web page display ID instead of inventing one.
(WebKit::LayerTreeHost::setIsDiscardable): Do not change display ID.
Jun 2, 2019:
- 10:29 PM Changeset in webkit [246029] by
-
- 3 edits6 adds in branches/safari-608.1.27-branch
Cherry-pick r245989. rdar://problem/51283532
iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=198244
Reviewed by Simon Fraser.
Source/WebKit:
This is a follow up to r245006. Even when overflow: hidden is specified on the document body,
we still need to make it scrollable when the page is pinch zoomed or there is a content inset
e.g. for software keyboard. Otherwise, the user won't be able to get to the content that is
outside the visual viewport when pinch zoomed or the parts of the page that is not outside
the visual viewport due to the scrolling caused by the software keyboard being brought up.
- UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _didCommitLayerTree:]):
LayoutTests:
Added regression tests.
- fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard-expected.txt: Added.
- fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: Added.
- fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1-expected.txt: Added.
- fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: Added.
- fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2-expected.txt: Added.
- fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 10:28 PM Changeset in webkit [246028] by
-
- 2 edits in trunk/Tools
[WinCairo][MiniBrowser] WKViewSetIsInWindow should be called
https://bugs.webkit.org/show_bug.cgi?id=198474
Reviewed by Darin Adler.
WinCairo WK2 MiniBrowser can't play back videos because
Page::canStartMedia() always returns false. WKViewSetIsInWindow
should be called.
The original MiniBrowser did it in Bug 55364.
- MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow): Call WKViewSetIsInWindow.
- 7:12 PM Changeset in webkit [246027] by
-
- 2 edits in trunk/LayoutTests
Flaky Test: inspector/canvas/recording.html
https://bugs.webkit.org/show_bug.cgi?id=198470
Reviewed by Matt Baker.
- inspector/canvas/recording.html:
Don't rely on
frameCountto automatically stop the recording, as that's dependent on when
the <canvas> paints and is less controllable/deterministic.
- 5:05 PM Changeset in webkit [246026] by
-
- 7 edits in trunk/Source/WebInspectorUI
Web Inspector: Debugger: sidebar should always reveal active call frame when hitting a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=198228
<rdar://problem/46719447>
Reviewed by Devin Rousso.
Reveal the active call frame TreeElement when call frames change. Refreshing
the current target's ThreadTreeElement children is insufficient, since
the sidebar panel content may have been scrolled.
This patch also introduces a workaround to prevent the DetailsSection header
element, which has sticky positioning, from covering a revealed TreeElement.
This can be the case when the TreeElement being revealed is at the topmost edge
of the scrolled content element.
- UserInterface/Base/Utilities.js:
- UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype.createContentTreeOutline):
(WI.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
- UserInterface/Views/DetailsSection.js:
(WI.DetailsSection.prototype.get element):
(WI.DetailsSection.prototype.get headerElement):
(WI.DetailsSection.prototype.get identifier):
- UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
- UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.reveal):
- UserInterface/Views/TreeOutline.js:
- 4:34 PM Changeset in webkit [246025] by
-
- 7 edits in trunk/Source/WebInspectorUI
Web Inspector: propagate whether to show prototype information to subobject views
https://bugs.webkit.org/show_bug.cgi?id=194929
Reviewed by Matt Baker.
Add a way to mark the
ObjectTreeViewas holding a JSON value, which extends
showOnlyPropertiesto also hide the prototype of all held values (e.g. children).
- UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype.showOnlyJSON): Added.
- UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only.json-only .object-tree-property .prototype-property): Added.
- UserInterface/Views/AuditTestCaseContentView.js:
(WI.AuditTestCaseContentView.prototype.layout):
- UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
- UserInterface/Views/JSONResourceContentView.css:
(.content-view.resource.json .object-tree .prototype-property): Deleted.
- UserInterface/Views/JSONResourceContentView.js:
(WI.JSONResourceContentView.prototype.contentAvailable):
- 3:18 PM Changeset in webkit [246024] by
-
- 2 edits in trunk/Source/JavaScriptCore
[JSC] Crash explicitly if StructureIDs are exhausted
https://bugs.webkit.org/show_bug.cgi?id=198467
Reviewed by Sam Weinig.
When StructureIDTable::m_size reaches to s_maximumNumberOfStructures, newCapacity in resize function is also capped with s_maximumNumberOfStructures.
So m_size == newCapacity. In that case, the following code in resize function,makeFreeListFromRange(m_size, m_capacity - 1);starts executing the
wrong code.
Currently, this is safe. We immediately execute the wrong code in makeFreeListFromRange, and crash with zero division. But we should not rely on
this crash, and instead we should explicitly crash because we exhaust StructureIDs.
This patch inserts RELEASE_ASSERT for
m_size < newCapacitystatus to ensure that resize is always extending the table.
In practice, this crash does not happen in Safari because Safari has memory footprint limit. To exhaust StructureIDs, we need to allocate massive
amount of Structures, and it exceeds the memory footprint limit and the process will be killed.
- runtime/StructureIDTable.cpp:
(JSC::StructureIDTable::resize):
- 1:51 PM Changeset in webkit [246023] by
-
- 2 edits in trunk/Source/WebKit
Provide an action to save an image on a link sheet
https://bugs.webkit.org/show_bug.cgi?id=198464
Reviewed by Wenson Hsieh.
When providing the set of default actions for a link
sheet, if an URL to an image was provided then offer
the action to save that image to Photos.
- UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
- 1:02 PM Changeset in webkit [246022] by
-
- 9 edits in trunk/Source
Reenable Gigacage on ARM64.
https://bugs.webkit.org/show_bug.cgi?id=198453
Reviewed by Filip Pizlo.
Source/bmalloc:
- bmalloc/Gigacage.h:
Source/JavaScriptCore:
This patch adds back Gigacaging on Apple's ARM64 ports. Unlike the
old Gigacage however, arm64e uses both Gigacaging and PAC. Since
Gigacaging would otherwise strip a PAC failed authenticate bit we
force a load of the pointer into some garbage register.
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::jumpForTypedArrayIsNeuteredIfOutOfBounds):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::untagArrayPtr):
(JSC::FTL::DFG::LowerDFGToB3::caged):
- jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::cageConditionally):
- llint/LowLevelInterpreter64.asm:
Source/WTF:
- wtf/CagedPtr.h:
(WTF::CagedPtr::authenticatingLoad):
(WTF::CagedPtr::get const):
(WTF::CagedPtr::getMayBeNull const):
- 5:25 AM Changeset in webkit [246021] by
-
- 4 edits in trunk/Source/JavaScriptCore
CachedMetadataTable::decode leaks empty tables
https://bugs.webkit.org/show_bug.cgi?id=198465
<rdar://problem/51307673>
Reviewed by Yusuke Suzuki.
CachedMetadataTable::decode creates the metadata and never calls finalize on it.
This leaks the underlying UnlinkedMetadataTable buffer when m_hasMetadata is false,
since the buffer would be freed in finalize instead of in the destructor.
- bytecode/UnlinkedMetadataTable.h:
(JSC::UnlinkedMetadataTable::empty):
- bytecode/UnlinkedMetadataTableInlines.h:
(JSC::UnlinkedMetadataTable::UnlinkedMetadataTable):
- runtime/CachedTypes.cpp:
(JSC::CachedMetadataTable::decode const):