Timeline
Apr 6, 2019:
- 8:55 PM Changeset in webkit [243965] by
-
- 5 edits in trunk
Added tests for WeakHashSet::computesEmpty and WeakHashSet::computeSize
https://bugs.webkit.org/show_bug.cgi?id=196669
Reviewed by Geoffrey Garen.
Source/WTF:
Removed the superflous type names from forward declarations, and made WeakHashSet::add
take a const object to match other container types in WTF.
- wtf/WeakHashSet.h:
(WTF::WeakHashSet::add):
- wtf/WeakPtr.h:
Tools:
Added three new unit tests for WeakHashSet.
- TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(WTF_WeakPtr.WeakHashSetConstObjects):
(WTF_WeakPtr.WeakHashSetComputesEmpty):
(WTF_WeakPtr.WeakHashSetComputeSize):
- 7:54 PM Changeset in webkit [243964] by
-
- 2 edits in trunk/Source/WebInspectorUI
REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible
https://bugs.webkit.org/show_bug.cgi?id=196667
<rdar://problem/49664912>
Reviewed by Timothy Hatcher.
Explicitly define
hiddenandshownmethods instead of relying on SidebarPanel'svisiblegetter.
- UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): Deleted.
(WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Added.
(WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Added.
- 7:25 PM Changeset in webkit [243963] by
-
- 8 edits in trunk
Hide next and previous form control buttons when WKWebView is editable
https://bugs.webkit.org/show_bug.cgi?id=196672
<rdar://problem/35625321>
Reviewed by Tim Horton.
Source/WebKit:
Adopt new UIKit SPI to hide or show next and previous controls in the form accessory view when changing
editability.
Test: KeyboardInputTests.FormNavigationAssistantBarButtonItems
- Platform/spi/ios/UIKitSPI.h:
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setEditable:]):
- UIProcess/ios/WKContentViewInteraction.h:
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateAccessory]):
(-[WKContentView _didChangeWebViewEditability]):
Tools:
Add a new API test.
- TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(-[TestWKWebView lastTrailingBarButtonGroup]):
(TestWebKitAPI::TEST):
- TestWebKitAPI/ios/UIKitSPI.h:
- 9:48 AM Changeset in webkit [243962] by
-
- 30 edits1 move1 add1 delete in trunk
Combine event and touch action regions into a single class
https://bugs.webkit.org/show_bug.cgi?id=196644
<rdar://problem/49643614>
Reviewed by Darin Adler.
Source/WebCore:
This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
It collects both the overall event region and the touch action regions. This avoids duplication
and simplifies the code.
The patch also adds serialization support for EventRegion, so touch-action regions gets passed
to the UI process too.
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setEventRegion):
(WebCore::GraphicsLayer::dumpProperties const):
(WebCore::GraphicsLayer::setTouchActionRegion): Deleted.
- platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::eventRegion const):
(WebCore::GraphicsLayer::touchActionRegion const): Deleted.
- platform/graphics/Region.cpp:
(WebCore::operator<<):
- platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setEventRegion):
(WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.
- platform/graphics/ca/GraphicsLayerCA.h:
- platform/graphics/ca/PlatformCALayer.h:
- platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
- rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.
(WebCore::EventRegion::operator== const):
(WebCore::EventRegion::unite):
(WebCore::EventRegion::translate):
(WebCore::EventRegion::uniteTouchActions):
(WebCore::EventRegion::touchActionsForPoint const):
(WebCore::operator<<):
(WebCore::TouchActionRegion::unite): Deleted.
(WebCore::TouchActionRegion::actionsForPoint const): Deleted.
(WebCore::TouchActionRegion::translate): Deleted.
- rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.
(WebCore::EventRegion::isEmpty const):
(WebCore::EventRegion::contains const):
(WebCore::EventRegion::hasTouchActions const):
(WebCore::EventRegion::encode const):
(WebCore::EventRegion::decode):
(WebCore::TouchActionRegion::isEmpty const): Deleted.
(WebCore::TouchActionRegion::operator== const): Deleted.
- rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
- rendering/PaintInfo.h:
- rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectEventRegionForFragments):
- rendering/RenderLayer.h:
- rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateEventRegion):
- rendering/RenderLayerModelObject.cpp:
- rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
- rendering/TouchActionRegion.cpp: Removed.
- rendering/TouchActionRegion.h: Removed.
Source/WebKit:
- Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
- Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
- UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
(WebKit::RemoteLayerTreeNode::eventRegion const):
- UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:
(WebKit::RemoteLayerTreeNode::setEventRegion):
- WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::setEventRegion):
- WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
LayoutTests:
- pointerevents/ios/touch-action-region-basic-expected.txt:
- pointerevents/ios/touch-action-region-layers-expected.txt:
- pointerevents/ios/touch-action-region-pan-x-y-expected.txt:
Apr 5, 2019:
- 8:41 PM Changeset in webkit [243961] by
-
- 13 edits2 adds in trunk
We should pass minimumEffectiveDeviceWidth to web process on new page creation.
https://bugs.webkit.org/show_bug.cgi?id=196077
<rdar://problem/49108202>
Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-04-05
Reviewed by Chris Dumez.
Source/WebCore:
If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
the page to fit the window width.
Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html
- page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size
when the default configuration is changed.
(WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content
to window width.
Source/WebKit:
When a new web view is created, it is possible we don't have the web content process till a load
is requested. This patch stashes minimumEffectiveDeviceWidth in WebPageProxy.cpp and passes that
value down to web process via WebPageCreationParameters when a new process is created, just like
we did for other values like viewportConfigurationLayoutSizeScaleFactor or viewportConfigurationViewLayoutSize.
- Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const): Encode viewportConfigurationMinimumEffectiveDeviceWidth value.
(WebKit::WebPageCreationParameters::decode): Decode viewportConfigurationMinimumEffectiveDeviceWidth value.
- Shared/WebPageCreationParameters.h:
- UIProcess/API/Cocoa/WKWebView.mm: Now that we stash the minimumEffectiveDeviceWidth value in WebPageProxy, we
don't need the iVar in WKWebView any more.
(-[WKWebView _dispatchSetViewLayoutSize:]): Use _page->minimumEffectiveDeviceWidth().
(-[WKWebView _setViewScale:]): Ditto.
(-[WKWebView _setMinimumEffectiveDeviceWidth:]): Ditto.
(-[WKWebView _minimumEffectiveDeviceWidth]): Ditto.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Also add viewportConfigurationMinimumEffectiveDeviceWidth to
web process creation parameter.
- UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::minimumEffectiveDeviceWidth const): Returns m_viewportConfigurationMinimumEffectiveDeviceWidth.
- UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize): Pass parameters.viewportConfigurationMinimumEffectiveDeviceWidth
to web process.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Take viewportConfigurationMinimumEffectiveDeviceWidth value from the parameter and
set that to viewport configuration.
Tools:
Add an API test to verify the minimumEffectDeviceWidth is passed to web content process
on new web view.
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
LayoutTests:
Add a layout test to verify the page shrinks to fit the window width when ignoreMetaViewport
flag is turned on.
- fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta-expected.txt: Added.
- fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html: Added.
- 7:05 PM Changeset in webkit [243960] by
-
- 2 edits in trunk/Tools
Make compare-results understand MotionMark
https://bugs.webkit.org/show_bug.cgi?id=196666
Reviewed by Yusuke Suzuki.
- Scripts/compare-results:
(PLT5Results):
(detectMotionMark):
(detectMotionMark1_1):
(motionMarkResults):
(motionMark1_1Results):
(detectBenchmark):
(biggerIsBetter):
(main):
- 6:57 PM Changeset in webkit [243959] by
-
- 9 edits1 add in trunk
[JSC] OSRExit recovery for SpeculativeAdd does not consier "A = A + A" pattern
https://bugs.webkit.org/show_bug.cgi?id=196582
Reviewed by Saam Barati.
JSTests:
- stress/add-overflow-check-with-three-same-registers.js: Added.
(foo):
(Number.prototype.valueOf):
(runWithNumber):
Source/JavaScriptCore:
In DFG, our ArithAdd with overflow is executed speculatively, and we recover the value when overflow flag is set.
The recovery is subtracting the operand from the destination to get the original two operands. Our recovery code
handles A + B = A, A + B = B cases. But it misses A + A = A case (here, A and B are GPRReg). Our recovery code
attempts to produce the original operand by performing A - A, and it always produces zero accidentally.
This patch adds the recovery code for A + A = A case. Because we know that this ArithAdd overflows, and operands were
same values, we can calculate the original operand from the destination value by((int32_t)value >> 1) ^ 0x80000000.
We also found that FTL recovery code is dead. We remove them in this patch.
- dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::OSRExit::compileExit):
- dfg/DFGOSRExit.h:
(JSC::DFG::SpeculationRecovery::SpeculationRecovery):
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithAdd):
- ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dataFormat const):
(JSC::FTL::ExitValue::dumpInContext const):
- ftl/FTLExitValue.h:
(JSC::FTL::ExitValue::isArgument const):
(JSC::FTL::ExitValue::hasIndexInStackmapLocations const):
(JSC::FTL::ExitValue::adjustStackmapLocationsIndexByOffset):
(JSC::FTL::ExitValue::recovery): Deleted.
(JSC::FTL::ExitValue::isRecovery const): Deleted.
(JSC::FTL::ExitValue::leftRecoveryArgument const): Deleted.
(JSC::FTL::ExitValue::rightRecoveryArgument const): Deleted.
(JSC::FTL::ExitValue::recoveryFormat const): Deleted.
(JSC::FTL::ExitValue::recoveryOpcode const): Deleted.
- ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::preparePatchpointForExceptions):
(JSC::FTL::DFG::LowerDFGToB3::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToB3::exitValueForNode):
(JSC::FTL::DFG::LowerDFGToB3::addAvailableRecovery): Deleted.
- ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileRecovery):
- 6:08 PM Changeset in webkit [243958] by
-
- 12 edits2 adds in trunk
[Cocoa] Deactivate the audio session before the WebProcess suspends.
https://bugs.webkit.org/show_bug.cgi?id=196658
Reviewed by Eric Carlson.
Source/WebCore:
Test: platform/mac/media/audio-session-deactivated-when-suspended.html
Deactivate the audio session when we are notified that the session will suspend.
Drive-by fix: don't try to begin playback when the process is suspended.
- platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
(WebCore::PlatformMediaSessionManager::processWillSuspend):
(WebCore::PlatformMediaSessionManager::processDidResume):
- platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::processIsSuspended const):
- testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldDeactivateAudioSession):
- testing/InternalSettings.h:
- testing/InternalSettings.idl:
- testing/Internals.cpp:
(WebCore::Internals::processWillSuspend):
(WebCore::Internals::processDidResume):
- testing/Internals.h:
- testing/Internals.idl:
Source/WebKit:
Notify the PlatformMediaSessionManager when the process suspends or resumes.
- WebProcess/WebProcess.cpp:
(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):
LayoutTests:
- platform/mac/media/audio-session-deactivated-when-suspended-expected.txt: Added.
- platform/mac/media/audio-session-deactivated-when-suspended.html: Added.
- 6:02 PM Changeset in webkit [243957] by
-
- 5 edits in trunk/Source
[iOS] Web process gets suspended while holding locked database files
https://bugs.webkit.org/show_bug.cgi?id=196519
<rdar://problem/49531797>
Reviewed by Chris Dumez.
Source/WebCore:
Don't use DatabaseTracker singleton before it is initialized.
- Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::isInitialized):
- Modules/webdatabase/DatabaseTracker.h:
Source/WebKit:
- WebProcess/WebProcess.cpp:
(WebKit::WebProcess::actualPrepareToSuspend):
- 5:10 PM Changeset in webkit [243956] by
-
- 5 edits in trunk
Clicking "Go Back" from a safe browsing warning from an iframe should navigate the WKWebView back to the previous page
https://bugs.webkit.org/show_bug.cgi?id=196665
<rdar://45115669>
Reviewed by Geoff Garen.
Source/WebKit:
It is insufficient to just not navigate the subframe. We must leave the page that contained it.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::showSafeBrowsingWarning):
Tools:
- TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(goBack):
(+[SimpleLookupContext sharedLookupContext]):
(-[SimpleLookupContext lookUpURL:completionHandler:]):
(TEST):
(+[Simple3LookupContext sharedLookupContext]): Deleted.
(-[Simple3LookupContext lookUpURL:completionHandler:]): Deleted.
- 5:05 PM Changeset in webkit [243955] by
-
- 3 edits1 delete in trunk
Unreviewed, rolling out r243665.
Caused iOS JSC tests to exit with an exception.
Reverted changeset:
"Assertion failed in JSC::createError"
https://bugs.webkit.org/show_bug.cgi?id=196305
https://trac.webkit.org/changeset/243665
- 5:03 PM Changeset in webkit [243954] by
-
- 22 edits in trunk/Source
Make WeakPtr<Element> possible and deploy it in form associated elements code
https://bugs.webkit.org/show_bug.cgi?id=196626
Reviewed by Antti Koivisto.
Source/WebCore:
Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
No new tests sine there should be no behavioral change.
- dom/Element.h:
- html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):
- html/FormAssociatedElement.h:
(WebCore::FormAssociatedElement::form const):
- html/HTMLElement.cpp:
(WebCore::HTMLElement::asFormNamedItem):
(WebCore::HTMLElement::asFormAssociatedElement):
- html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem): Deleted.
- html/HTMLFormControlElement.h:
- html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
- html/HTMLFormControlsCollection.h:
- html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
- html/HTMLFormElement.h:
- html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):
- html/HTMLImageElement.h:
- html/HTMLInputElement.h:
- html/HTMLMediaElement.h:
- html/HTMLObjectElement.h:
- html/HTMLPictureElement.h:
- html/HTMLSlotElement.h:
- svg/SVGElement.h:
Source/WTF:
Make it possible to call WeakHashSet::remove and WeakHashSet::contains with
a subclass type U of a type T used to define WeakReference<T>.
Also added computesEmpty, which is slightly more efficient than computeSize
when m_set is either empty or when there are non-released weak references in the set.
- wtf/WeakHashSet.h:
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Added.
- wtf/WeakPtr.h: Added an explicit forward declaration of WeakHashSet to avoid
build failures in GTK+ and WPE ports.
- 4:39 PM Changeset in webkit [243953] by
-
- 17 edits in trunk
Web Inspector: TestSuite test cases should have their own timeout to ensure tests fail with output instead of timeout by test runner
https://bugs.webkit.org/show_bug.cgi?id=162814
<rdar://problem/28574102>
Reviewed by Brian Burg.
Source/WebInspectorUI:
A 10s timer is started for every test case added to an async suite. The timer is cleared
when the test finishes, but if the timer fires, the test is forcibly ended with an error.
This timer can be configured by setting a
timeoutvalue when adding the test case. Values
are expected to be in milliseconds. The value-1will prevent a timer from being set.
This change also relaxes the expectation that any individual test case failure will stop the
rest of the suite from running. Since timers are set per test case, it is possible to
recover from a "bad" test case to still run the remaining test cases.
NOTE: there may be unexpected behaviour if a test times out, as the timer doesn't actually
stop the execution of the test, so it may still run and log information, which may appear
"out of nowhere" in the middle of other tests.
- UserInterface/Test/TestSuite.js:
(TestSuite.prototype.get passCount):
(AsyncTestSuite.prototype.runTestCases):
(SyncTestSuite.prototype.runTestCases):
LayoutTests:
- inspector/unit-tests/async-test-suite.html:
- inspector/unit-tests/async-test-suite-expected.txt:
- inspector/unit-tests/sync-test-suite.html:
- inspector/unit-tests/sync-test-suite-expected.txt:
- http/tests/inspector/network/set-resource-caching-disabled-disk-cache-expected.txt:
- inspector/canvas/recording-2d.html:
- inspector/canvas/recording-webgl-snapshots.html:
- inspector/canvas/recording-webgl.html:
- inspector/canvas/resources/shaderProgram-utilities.js:
(TestPage.registerInitializer.whenProgramAdded): Added.
(TestPage.registerInitializer.whenProgramRemoved): Added.
(TestPage.registerInitializer.window.initializeTestSuite):
(TestPage.registerInitializer.window.addSimpleTestCase):
(TestPage.registerInitializer.window.addParentCanvasRemovedTestCase):
(TestPage.registerInitializer.awaitProgramAdded): Added.
(TestPage.registerInitializer.awaitProgramRemoved): Added.
- inspector/console/command-line-api-expected.txt:
- inspector/console/heap-snapshot.html:
- inspector/debugger/async-stack-trace-truncate-expected.txt:
- inspector/debugger/pause-for-internal-scripts-expected.txt:
- inspector/formatting/resources/utilities.js:
(TestPage.registerInitializer.window.addFormattingTests):
- 4:25 PM Changeset in webkit [243952] by
-
- 2 edits in trunk/Tools
[ews-build] Add configuration and architecture for windows builders
https://bugs.webkit.org/show_bug.cgi?id=196660
Reviewed by Lucas Forschler.
- BuildSlaveSupport/ews-build/config.json:
- 4:06 PM Changeset in webkit [243951] by
-
- 5 edits in trunk/Source/WebKit
Undeprecate WKNavigationData
https://bugs.webkit.org/show_bug.cgi?id=196559
<rdar://44927425>
Reviewed by Geoff Garen.
- UIProcess/API/Cocoa/WKNavigationData.h:
It is used to communicate information from FrameLoaderClient::updateGlobalHistory() to the application.
This use in WKBrowsingContextHistoryDelegate is definitely still deprecated, but its use in
WKHistoryDelegatePrivate does not have an adequate replacement yet, so it must remain undeprecated SPI.
- 3:08 PM Changeset in webkit [243950] by
-
- 9 edits in tags/Safari-608.1.15/Source/JavaScriptCore
Revert r243642. rdar://problem/49654398
- 3:08 PM Changeset in webkit [243949] by
-
- 5 edits in tags/Safari-608.1.15
Revert r243839. rdar://problem/49654398
- 2:58 PM Changeset in webkit [243948] by
-
- 7 edits2 adds in trunk
SIGSEGV in JSC::BytecodeGenerator::addStringConstant
https://bugs.webkit.org/show_bug.cgi?id=196486
Reviewed by Saam Barati.
JSTests:
- stress/arrow-function-and-use-strict-directive.js: Added.
- stress/arrow-function-syntax.js: Added. Checking EOF token handling.
(checkSyntax):
(checkSyntaxError): Currently not using it. But it is useful for testing more things related to arrow function syntax.
Source/JavaScriptCore:
When parsing a FunctionExpression / FunctionDeclaration etc., we use SyntaxChecker for the body of the function because we do not have any interest on the nodes of the body at that time.
The nodes will be parsed with the ASTBuilder when the function itself is parsed for code generation. This works well previously because all the function ends with "}" previously.
SyntaxChecker lexes this "}" token, and parser restores the context back to ASTBuilder and continues parsing.
But now, we have ArrowFunctionExpression without braces
arrow => expr. Let's consider the following code.
arrow => expr
"string!"
We parse arrow function's body with SyntaxChecker. At that time, we lex "string!" token under the SyntaxChecker context. But this means that we may not build string content for this token
since SyntaxChecker may not have interest on string content itself in certain case. After the parser is back to ASTBuilder, we parse "string!" as ExpressionStatement with string constant,
generate StringNode with non-built identifier (nullptr), and we accidentally create StringNode with nullptr.
This patch fixes this problem. The root cause of this problem is that the last token lexed in the previous context is used. We add lexCurrentTokenAgainUnderCurrentContext which will re-lex
the current token under the current context (may be ASTBuilder). This should be done only when the caller's context is different from SyntaxChecker, which avoids unnecessary lexing.
We leverage existing SavePoint mechanism to implement lexCurrentTokenAgainUnderCurrentContext cleanly.
And we also fix the bug in the existing SavePoint mechanism, which is shown in the attached test script. When we save LexerState, we do not save line terminator status. This patch also introduces
lexWithoutClearingLineTerminator, which lex the token without clearing line terminator status.
- parser/ASTBuilder.h:
(JSC::ASTBuilder::createString):
- parser/Lexer.cpp:
(JSC::Lexer<T>::parseMultilineComment):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator): EOF token also should record offset information. This offset information is correctly handled in Lexer::setOffset too.
(JSC::Lexer<T>::lex): Deleted.
- parser/Lexer.h:
(JSC::Lexer::hasLineTerminatorBeforeToken const):
(JSC::Lexer::setHasLineTerminatorBeforeToken):
(JSC::Lexer<T>::lex):
(JSC::Lexer::prevTerminator const): Deleted.
(JSC::Lexer::setTerminator): Deleted.
- parser/Parser.cpp:
(JSC::Parser<LexerType>::allowAutomaticSemicolon):
(JSC::Parser<LexerType>::parseSingleFunction):
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseYieldExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
- parser/Parser.h:
(JSC::Parser::nextWithoutClearingLineTerminator):
(JSC::Parser::lexCurrentTokenAgainUnderCurrentContext):
(JSC::Parser::internalSaveLexerState):
(JSC::Parser::restoreLexerState):
- 2:52 PM Changeset in webkit [243947] by
-
- 4 edits1 add in /
REGRESSION(AppleWebKit/605.1.15): WebDownloadDelegate delegate methods called on non-main thread
https://bugs.webkit.org/show_bug.cgi?id=190918
<rdar://problem/45603890>
Reviewed by Darin Adler.
Source/WebKitLegacy/mac:
Since we not doing networking on the main thread but WebView is to be used on the main thread,
we need to hop delegate calls to the main thread similarly to how we do it in the non-download
delegate calls in WebCoreResourceHandleAsOperationQueueDelegate.
- Misc/WebDownload.mm:
(-[WebDownloadInternal downloadDidBegin:]):
(-[WebDownloadInternal download:willSendRequest:redirectResponse:]):
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
(-[WebDownloadInternal download:didReceiveResponse:]):
(-[WebDownloadInternal download:didReceiveDataOfLength:]):
(-[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]):
(-[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]):
(-[WebDownloadInternal download:didCreateDestination:]):
(-[WebDownloadInternal downloadDidFinish:]):
(-[WebDownloadInternal download:didFailWithError:]):
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm: Added.
(-[DownloadThreadChecker webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
(-[DownloadThreadChecker downloadDidBegin:]):
(-[DownloadThreadChecker download:shouldDecodeSourceDataOfMIMEType:]):
(-[DownloadThreadChecker download:decideDestinationWithSuggestedFilename:]):
(-[DownloadThreadChecker download:didCreateDestination:]):
(-[DownloadThreadChecker downloadDidFinish:]):
(TestWebKitAPI::TEST):
- 2:50 PM Changeset in webkit [243946] by
-
- 2 edits in /
Flaky API Test TestWebKitAPI.WebKit.PerformedActionForURL
https://bugs.webkit.org/show_bug.cgi?id=196151
Reviewed by Chris Dumez.
- TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
We were assuming that messages were received in a certain order.
Actually wait for all messages to be received before checking results.
- 2:49 PM Changeset in webkit [243945] by
-
- 3 edits in trunk/LayoutTests
[Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196633
Unreviewed test gardening.
- platform/ios-wk2/TestExpectations: Mark test as flaky.
- platform/mac-wk2/TestExpectations: Ditto.
- 2:36 PM Changeset in webkit [243944] by
-
- 4 edits in trunk/Source
Remove AUDIO_TOOLBOX_AUDIO_SESSION
https://bugs.webkit.org/show_bug.cgi?id=196653
<rdar://problem/49652098>
Reviewed by Jer Noble.
Source/WebKitLegacy/mac:
- WebView/WebPreferences.mm:
(-[WebPreferences setAudioSessionCategoryOverride:]):
Source/WTF:
- wtf/Platform.h:
- 2:28 PM Changeset in webkit [243943] by
-
- 7 edits in trunk
[JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
https://bugs.webkit.org/show_bug.cgi?id=176810
Reviewed by Saam Barati.
JSTests:
Add tests for the DontEnum filtering, and variations of other tests
take the DontEnum-filtering path.
- stress/proxy-own-keys.js:
(i.catch):
(set assert):
(set add):
(let.set new):
(get let):
Source/JavaScriptCore:
This adds conditional logic following the invariant checks, to perform
filtering in common uses of getOwnPropertyNames.
While this would ideally only be done in JSPropertyNameEnumerator, adding
the filtering to ProxyObject::performGetOwnPropertyNames maintains the
invariant that the EnumerationMode is properly followed.
- runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::reset):
- runtime/ProxyObject.cpp:
(JSC::ProxyObject::performGetOwnPropertyNames):
Source/WebCore:
Previously, there was a comment here indicating uncertainty of whether it
was necessary to filter DontEnum properties explicitly or not. It turns
out that it was necessary in the case of JSC ProxyObjects.
This patch adds DontEnum filtering for ProxyObjects, however we continue
to explicitly filter them in JSDOMConvertRecord, which needs to use the
property descriptor after filtering. This change prevents observably
fetching the property descriptor twice per property.
- bindings/js/JSDOMConvertRecord.h:
- 2:13 PM Changeset in webkit [243942] by
-
- 2 edits in trunk/LayoutTests
editing/execCommand/print.html is crashing on iOS Debug
https://bugs.webkit.org/show_bug.cgi?id=196654
Unreviewed test gardening.
- platform/ios-simulator-wk2/TestExpectations: Skipping test on iOS Debug while waiting for a fix
- 11:32 AM Changeset in webkit [243941] by
-
- 21 edits in trunk/Source
Unreviewed manual rollout of r243929
https://bugs.webkit.org/show_bug.cgi?id=196626
Source/WebCore:
- dom/Element.h:
- html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):
- html/FormAssociatedElement.h:
(WebCore::FormAssociatedElement::form const):
- html/HTMLElement.cpp:
(WebCore::HTMLElement::asFormNamedItem): Deleted.
(WebCore::HTMLElement::asFormAssociatedElement): Deleted.
- html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem):
- html/HTMLFormControlElement.h:
- html/HTMLFormControlsCollection.cpp:
(WebCore:: const):
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
- html/HTMLFormControlsCollection.h:
- html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
- html/HTMLFormElement.h:
- html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):
- html/HTMLImageElement.h:
- html/HTMLInputElement.h:
- html/HTMLMediaElement.h:
- html/HTMLObjectElement.h:
- html/HTMLPictureElement.h:
- html/HTMLSlotElement.h:
- svg/SVGElement.h:
Source/WTF:
- wtf/WeakHashSet.h:
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Deleted.
- 11:21 AM Changeset in webkit [243940] by
-
- 3 edits in trunk/Source/WebKitLegacy/mac
Stop including <AudioToolbox/AudioSession.h>
https://bugs.webkit.org/show_bug.cgi?id=196648
<rdar://problem/39665771>
Reviewed by Jer Noble.
- WebView/WebPreferencesPrivate.h:
- 11:06 AM Changeset in webkit [243939] by
-
- 9 edits in trunk/Source
[iOS] Web process gets suspended while holding locked database files
https://bugs.webkit.org/show_bug.cgi?id=196519
<rdar://problem/49531797>
Reviewed by Chris Dumez.
Source/WebCore:
We should close all databases and make sure not open new databases when web process is ready to suspend.
- platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
(WebCore::SQLiteDatabase::open):
- platform/sql/SQLiteDatabase.h:
- platform/sql/SQLiteDatabaseTracker.cpp:
(WebCore::SQLiteDatabaseTracker::setClient):
(WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
(WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
(WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
Source/WebKit:
- Shared/WebSQLiteDatabaseTracker.cpp:
(WebKit::WebSQLiteDatabaseTracker::~WebSQLiteDatabaseTracker):
- Shared/WebSQLiteDatabaseTracker.h:
- WebProcess/WebProcess.cpp:
(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::processWillSuspendImminently):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):
- WebProcess/WebProcess.h:
- 11:01 AM Changeset in webkit [243938] by
-
- 7 edits in tags/Safari-608.1.13.3.1/Source
Versioning.
- 10:22 AM Changeset in webkit [243937] by
-
- 1 copy in tags/Safari-608.1.13.3.1
New tag.
- 10:14 AM Changeset in webkit [243936] by
-
- 2 edits in trunk/Tools
webkitpy: Don't run subsequent rounds if interrupted
https://bugs.webkit.org/show_bug.cgi?id=196646
Reviewed by Aakash Jain.
- Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run): Bail out if interrupted.
- 9:30 AM Changeset in webkit [243935] by
-
- 2 edits in trunk/Tools
Test sessionStorage in PSON private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=196561
Reviewed by Alex Christensen.
- TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
- 8:35 AM Changeset in webkit [243934] by
-
- 28 edits1 delete in trunk
Unreviewed, rolling out r243833.
https://bugs.webkit.org/show_bug.cgi?id=196645
This change breaks build of WPE and GTK ports (Requested by
annulen on #webkit).
Reverted changeset:
"[CMake][WTF] Mirror XCode header directories"
https://bugs.webkit.org/show_bug.cgi?id=191662
https://trac.webkit.org/changeset/243833
- 6:45 AM Changeset in webkit [243933] by
-
- 8 edits in trunk
JSTests:
[JSC] throw if 'ownKeys' Proxy trap result contains duplicate keys
https://bugs.webkit.org/show_bug.cgi?id=185211
Reviewed by Saam Barati.
This is for the normative spec change in https://github.com/tc39/ecma262/pull/833
This changes several assertions to expect a TypeError to be thrown (in some cases,
changing thee expected message).
- es6/Proxy_ownKeys_duplicates.js:
(handler):
(shouldThrow):
(test):
- stress/Object_static_methods_Object.getOwnPropertyDescriptors-proxy.js:
(shouldThrow):
- stress/proxy-own-keys.js:
(i.catch):
(assert):
LayoutTests/imported/w3c:
[JSC] throw if 'ownKeys' Proxy trap result contains duplicate keys
https://bugs.webkit.org/show_bug.cgi?id=185211
Reviewed by Saam Barati.
This is for the normative spec change in https://github.com/tc39/ecma262/pull/833
Change some test expectations which were previously expected to fail.
- web-platform-tests/fetch/api/headers/headers-record-expected.txt:
Source/JavaScriptCore:
[JSC] throw if ownKeys Proxy trap result contains duplicate keys
https://bugs.webkit.org/show_bug.cgi?id=185211
Reviewed by Saam Barati.
Implements the normative spec change in https://github.com/tc39/ecma262/pull/833
This involves tracking duplicate keys returned from the ownKeys trap in yet
another HashTable, and may incur a minor performance penalty in some cases. This
is not expected to significantly affect web performance.
- runtime/ProxyObject.cpp:
(JSC::ProxyObject::performGetOwnPropertyNames):
- 5:42 AM Changeset in webkit [243932] by
-
- 2 edits in trunk/Source/WebKit
REGRESSION(r240685): Remove duplicate Headers entry for _WKInspectorWindow.h in Xcode project
<https://bugs.webkit.org/show_bug.cgi?id=193951>
<rdar://problem/47621366>
Fixes the following build warnings:
Warning: Multiple build commands for output file WebKit2_WebKit.roots/BuildRecords/WebKit2_installhdrs/Root/System/Library/Frameworks/WebKit.framework/PrivateHeaders/_WKInspectorWindow.h
Warning: Multiple build commands for output file WebKit2_WebKit.roots/BuildRecords/WebKit2_installapi/Root/System/Library/Frameworks/WebKit.framework/PrivateHeaders/_WKInspectorWindow.h
Warning: Multiple build commands for output file WebKit2_WebKit.roots/BuildRecords/WebKit2_install/Root/System/Library/Frameworks/WebKit.framework/PrivateHeaders/_WKInspectorWindow.h
- WebKit.xcodeproj/project.pbxproj: Remove duplicate entry for
_WKInspectorWindow.h. In r240685, a second Headers entry was
added, but the first one was never removed.
- 5:25 AM Changeset in webkit [243931] by
-
- 14 edits in trunk/Source/WebCore
REGRESSION(r243887): Try to fix Windows builds by including <wtf/IsoMalloc.h>
Caused by:
[WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
https://bugs.webkit.org/show_bug.cgi?id=196475
- css/CSSComputedStyleDeclaration.h:
- dom/DOMRectReadOnly.h:
- dom/LiveNodeList.h:
- dom/NodeIterator.h:
- dom/TreeWalker.h:
- fileapi/Blob.h:
- fileapi/File.h:
- fileapi/FileList.h:
- html/CachedHTMLCollection.h:
- html/HTMLFormElement.h:
- html/HTMLNameCollection.h:
- html/canvas/GPUBasedCanvasRenderingContext.h:
- page/RemoteDOMWindow.h:
- 4:30 AM Changeset in webkit [243930] by
-
- 2 edits in trunk/LayoutTests
[WPE] Unreviewed gardening, update unexpected passes
- platform/wpe/TestExpectations:
- 1:22 AM Changeset in webkit [243929] by
-
- 21 edits in trunk/Source
Make WeakPtr<Element> possible and deploy it in form associated elements code
https://bugs.webkit.org/show_bug.cgi?id=196626
Reviewed by Antti Koivisto.
Source/WebCore:
Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
No new tests sine there should be no behavioral change.
- dom/Element.h:
- html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):
- html/FormAssociatedElement.h:
(WebCore::FormAssociatedElement::form const):
- html/HTMLElement.cpp:
(WebCore::HTMLElement::asFormNamedItem):
(WebCore::HTMLElement::asFormAssociatedElement):
- html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem): Deleted.
- html/HTMLFormControlElement.h:
- html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
- html/HTMLFormControlsCollection.h:
- html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
- html/HTMLFormElement.h:
- html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):
- html/HTMLImageElement.h:
- html/HTMLInputElement.h:
- html/HTMLMediaElement.h:
- html/HTMLObjectElement.h:
- html/HTMLPictureElement.h:
- html/HTMLSlotElement.h:
- svg/SVGElement.h:
Source/WTF:
Make it possible to call WeakHashSet::remove and WeakHashSet::contains with
a subclass type U of a type T used to define WeakReference<T>.
Also added computesEmpty, which is slightly more efficient than computeSize
when m_set is either empty or when there are non-released weak references in the set.
- wtf/WeakHashSet.h:
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Added.
- 12:35 AM Changeset in webkit [243928] by
-
- 15 edits in trunk/Source
[ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
https://bugs.webkit.org/show_bug.cgi?id=196593
<rdar://problem/49599153>
Reviewed by Michael Catanzaro.
Source/WebCore:
We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
WebKitAccessible instances. This requires a few casts to AtkObject.
- accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setWrapper):
- accessibility/AccessibilityObjectInterface.h:
- accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::detachWrapper):
(WebCore::AXObjectCache::attachWrapper):
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
- accessibility/atk/AccessibilityObjectAtk.cpp:
- accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
(webkitAccessibleComponentRefAccessibleAtPoint):
- accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
(webkitAccessibleHypertextGetLink):
(webkitAccessibleHypertextGetNLinks):
- accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionRefSelection):
- accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableRefAt):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
(webkitAccessibleTableGetCaption):
- accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(convertToGPtrArray):
(webkitAccessibleTableCellGetTable):
- accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(accessibilityObjectLength):
- accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkRelationSetFromCoreObject):
(atkParentOfRootObject):
(webkitAccessibleGetParent):
(webkitAccessibleRefChild):
(isTextWithCaret):
- editing/atk/FrameSelectionAtk.cpp:
(WebCore::emitTextSelectionChange):
(WebCore::maybeEmitTextFocusChange):
Source/WebKit:
- WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp:
(accessibilityRootObjectWrapper): Cast wrapper() as AtkObject.