Timeline



Apr 7, 2019:

7:58 PM Changeset in webkit [243969] by commit-queue@webkit.org
  • 5 edits in trunk

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

Broke API Test SafeBrowsing.WKWebViewGoBackIFrame (Requested
by aakashjain on #webkit).

Reverted changeset:

"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
https://trac.webkit.org/changeset/243956

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

Remove stray byte added by r241131
https://bugs.webkit.org/show_bug.cgi?id=196682

Reviewed by Alexey Proskuryakov.

Sublime Text thinks WKWebView.mm is binary instead of text.

According to online documentation and bisecting, this is because r241131
introduced a stray byte (probably a null byte?) into the file.

I fixed this with Cmd-C Cmd-V.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

4:24 PM Changeset in webkit [243967] by msaboff@apple.com
  • 3 edits
    1 add in trunk

REGRESSION (r243642): Crash in reddit.com page
https://bugs.webkit.org/show_bug.cgi?id=196684

Reviewed by Geoffrey Garen.

JSTests:

New regression test.

  • stress/regexp-nongreedy-charclass-backtracks.js: Added.

Source/JavaScriptCore:

In r243642, the code that saves and restores the count for non-greedy character classes
was inadvertently put inside an if statement. This code should be generated for all
non-greedy character classes.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

12:25 PM Changeset in webkit [243966] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] CallLinkInfo should clear Callee or CodeBlock even if it is unlinked by jettison
https://bugs.webkit.org/show_bug.cgi?id=196683

Reviewed by Saam Barati.

JSTests:

  • stress/clear-callee-or-codeblock-in-calllinkinfo-even-cleared-by-jettison.js: Added.

(foo):

Source/JavaScriptCore:

In r243626, we stop repatching CallLinkInfo when the CallLinkInfo is held by jettisoned CodeBlock.
But we still need to clear the Callee or CodeBlock since they are now dead. Otherwise, CodeBlock's
visitWeak eventually accesses this dead cells and crashes because the owner CodeBlock of CallLinkInfo
can be still live.

We also move all repatching operations from CallLinkInfo.cpp to Repatch.cpp for consistency because the
other repatching operations in CallLinkInfo are implemented in Repatch.cpp side.

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::setCallee):
(JSC::CallLinkInfo::clearCallee):

  • jit/Repatch.cpp:

(JSC::linkFor):
(JSC::revertCall):

Apr 6, 2019:

8:55 PM Changeset in webkit [243965] by rniwa@webkit.org
  • 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 Nikita Vasilyev
  • 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 hidden and shown methods instead of relying on SidebarPanel's visible getter.

  • 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 Wenson Hsieh
  • 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 Antti Koivisto
  • 30 edits
    1 move
    1 add
    1 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 commit-queue@webkit.org
  • 13 edits
    2 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 sbarati@apple.com
  • 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 ysuzuki@apple.com
  • 9 edits
    1 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 jer.noble@apple.com
  • 12 edits
    2 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 sihui_liu@apple.com
  • 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 achristensen@apple.com
  • 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 Ryan Haddad
  • 3 edits
    1 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 rniwa@webkit.org
  • 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 Devin Rousso
  • 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 timeout value when adding the test case. Values
are expected to be in milliseconds. The value -1 will 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 aakash_jain@apple.com
  • 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 achristensen@apple.com
  • 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 Alan Coon
  • 9 edits in tags/Safari-608.1.15/Source/JavaScriptCore

Revert r243642. rdar://problem/49654398

3:08 PM Changeset in webkit [243949] by Alan Coon
  • 5 edits in tags/Safari-608.1.15

Revert r243839. rdar://problem/49654398

2:58 PM Changeset in webkit [243948] by ysuzuki@apple.com
  • 7 edits
    2 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 achristensen@apple.com
  • 4 edits
    1 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 achristensen@apple.com
  • 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 Ryan Haddad
  • 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 eric.carlson@apple.com
  • 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 caitp@igalia.com
  • 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 Shawn Roberts
  • 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 Michael Catanzaro
  • 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 eric.carlson@apple.com
  • 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 sihui_liu@apple.com
  • 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 Kocsen Chung
  • 7 edits in tags/Safari-608.1.13.3.1/Source

Versioning.

10:22 AM Changeset in webkit [243937] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.13.3.1

New tag.

10:14 AM Changeset in webkit [243936] by Jonathan Bedard
  • 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 sihui_liu@apple.com
  • 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 commit-queue@webkit.org
  • 28 edits
    1 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 caitp@igalia.com
  • 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 ddkilzer@apple.com
  • 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 ddkilzer@apple.com
  • 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 Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Unreviewed gardening, update unexpected passes

  • platform/wpe/TestExpectations:
1:22 AM Changeset in webkit [243929] by rniwa@webkit.org
  • 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 Carlos Garcia Campos
  • 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.

Apr 4, 2019:

11:42 PM Changeset in webkit [243927] by Simon Fraser
  • 7 edits
    2 adds in trunk

Simple iframe scrolling test fails to get a composited scrolling frame in WebKitTestRunnerApp
https://bugs.webkit.org/show_bug.cgi?id=196635

Reviewed by Antti Koivisto.
Source/WebKit:

Remove WKBundleSetAsyncFrameScrollingEnabled().

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

(WKBundleSetAsyncFrameScrollingEnabled): Deleted.

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

Tools:

InjectedBundle::beginTesting() calling WKBundleSetAsyncFrameScrollingEnabled() makes it impossible
for a test to enable async frame scrolling via:

<!-- webkit-test-runner [ internal:AsyncFrameScrollingEnabled=true ] -->

so remove it and have TestController::resetPreferencesToConsistentValues() set the default value.

Test: scrollingcoordinator/ios/programmatic-frame-scroll.html

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

  • scrollingcoordinator/ios/programmatic-frame-scroll-expected.html: Added.
  • scrollingcoordinator/ios/programmatic-frame-scroll.html: Added.
10:18 PM Changeset in webkit [243926] by Simon Fraser
  • 19 edits
    4 adds in trunk

[iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
https://bugs.webkit.org/show_bug.cgi?id=195584

Reviewed by Zalan Bujtas.

Source/WebCore:

Push data to the scrolling tree about whether an overflow:scroll scroll was programmatic, by having
RenderLayer::scrollToOffset() call into AsyncScrollingCoordinator::requestScrollPositionUpdate(),
just as we do for frames.

AsyncScrollingCoordinator::requestScrollPositionUpdate() is generalized to take any ScrollableArea.

Fix an assumption in the ScrollingTree that we only care about programmatic scrolls on the root node.
ScrollingTree::commitTreeState() no longer sets isHandlingProgrammaticScroll; instead,
callers of ScrollingTreeScrollingNode::scrollTo() pass a ScrollType. Commit functions pass
ScrollType::Programmatic when handling RequestedScrollPosition changes as necessary.

Programmatic scrolls need to get to the scrolling tree in the UI process so that we update
the tree's notion of scroll position, and trigger actual UIScrollView scrolls (layers may have
already been put in the right locations, but the UI process needs to know that a scroll happened).
However, we need to prevent notifications from programmatic scrolls getting back to the
web process, because this causes jumpiness. This is done via an early return in
RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll().

Tests: scrollingcoordinator/ios/programmatic-overflow-scroll.html

scrollingcoordinator/ios/programmatic-page-scroll.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::isHandlingProgrammaticScroll): Deleted.

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::isHandlingProgrammaticScroll const):
(WebCore::ScrollingTree::setIsHandlingProgrammaticScroll):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::scrollBy):
(WebCore::ScrollingTreeScrollingNode::scrollTo):

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

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::scrollingNodeID const):

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

(WebCore::RenderMarquee::timerFired):

Source/WebKit:

Push data to the scrolling tree about whether an overflow:scroll scroll was programmatic, by having
RenderLayer::scrollToOffset() call into AsyncScrollingCoordinator::requestScrollPositionUpdate(),
just as we do for frames.

AsyncScrollingCoordinator::requestScrollPositionUpdate() is generalized to take any ScrollableArea.

Fix an assumption in the ScrollingTree that we only care about programmatic scrolls on the root node.
ScrollingTree::commitTreeState() no longer sets isHandlingProgrammaticScroll; instead,
callers of ScrollingTreeScrollingNode::scrollTo() pass a ScrollType. Commit functions pass
ScrollType::Programmatic when handling RequestedScrollPosition changes as necessary.

Programmatic scrolls need to get to the scrolling tree in the UI process so that we update
the tree's notion of scroll position, and trigger actual UIScrollView scrolls (layers may have
already been put in the right locations, but the UI process needs to know that a scroll happened).
However, we need to prevent notifications from programmatic scrolls getting back to the
web process, because this causes jumpiness. This is done via an early return in
RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll().

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren): Subframe nodes have
a delegate, and that will take care of the requestedScrollPosition update.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

LayoutTests:

Testing of programmatic scrolls in frames is prevented by webkit.org/b/196635.

  • scrollingcoordinator/ios/programmatic-overflow-scroll-expected.html: Added.
  • scrollingcoordinator/ios/programmatic-overflow-scroll.html: Added.
  • scrollingcoordinator/ios/programmatic-page-scroll-expected.html: Added.
  • scrollingcoordinator/ios/programmatic-page-scroll.html: Added.
9:17 PM Changeset in webkit [243925] by ysuzuki@apple.com
  • 8 edits
    2 copies
    1 add in trunk

[JSC] makeBoundFunction should not assume incoming "length" value is Int32 because it performs some calculation in bytecode
https://bugs.webkit.org/show_bug.cgi?id=196631

Reviewed by Saam Barati.

JSTests:

  • stress/make-bound-function-should-not-assume-int32-length.js: Added.

(assert):
(test):
(foo):

Source/JavaScriptCore:

makeBoundFunction assumes that "length" argument is always Int32. But this should not be done since this "length" value is calculated in builtin JS code.
DFG may store this value in Double format so that we should not rely on that this value is Int32. This patch fixes makeBoundFunction function to perform
toInt32 operation. We also insert a missing exception check for JSString::value(ExecState*) in makeBoundFunction.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • interpreter/CallFrameInlines.h:
  • runtime/DoublePredictionFuzzerAgent.cpp: Copied from Source/JavaScriptCore/interpreter/CallFrameInlines.h.

(JSC::DoublePredictionFuzzerAgent::DoublePredictionFuzzerAgent):
(JSC::DoublePredictionFuzzerAgent::getPrediction):

  • runtime/DoublePredictionFuzzerAgent.h: Copied from Source/JavaScriptCore/interpreter/CallFrameInlines.h.
  • runtime/JSGlobalObject.cpp:

(JSC::makeBoundFunction):

  • runtime/Options.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

6:45 PM Changeset in webkit [243924] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, speculative fix for build failure
https://bugs.webkit.org/show_bug.cgi?id=196475

  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
6:09 PM Changeset in webkit [243923] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Element::isFocusable() debug asserts too frequently
https://bugs.webkit.org/show_bug.cgi?id=196634

Reviewed by Geoffrey Garen.

Remove the debug assertion for now.

  • dom/Element.cpp:

(WebCore::Element::isFocusable const):

5:49 PM Changeset in webkit [243922] by ap@apple.com
  • 2 edits in trunk/Tools

Use a correct LC_RPATH when building with ASan
https://bugs.webkit.org/show_bug.cgi?id=196576

Reviewed by David Kilzer.

  • asan/asan.xcconfig: As a temporary hack, just force LC_RPATH on all binaries,

so that ../Frameworks is checked. This is simpler and more reliable than updating
each SPC service xcconfig.

5:31 PM Changeset in webkit [243921] by aakash_jain@apple.com
  • 6 edits in trunk/Websites/bugs.webkit.org

Add another status-bubble iframe to display results from new EWS
https://bugs.webkit.org/show_bug.cgi?id=196308

Reviewed by Lucas Forschler.

  • js/status-bubble.js:

(handleStatusBubbleMessage): Added URL for new EWS.
(handleStatusBubbleLoadNewEWS): Method to post message to new EWS.

  • code-review.js: Added another iframe to display results from new EWS.
  • template/en/default/attachment/edit.html.tmpl: Ditto.
  • template/en/default/attachment/list.html.tmpl: Ditto.
  • template/en/default/attachment/reviewform.html.tmpl: Ditto.
5:28 PM Changeset in webkit [243920] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Unreviewed. Make the test from r243906 catch the thrown exceptions.

  • stress/inferred-types-regex-matches-array.js:
5:11 PM Changeset in webkit [243919] by Simon Fraser
  • 14 edits in trunk/Source

Have ScrollableArea store a ScrollType for the current scroll
https://bugs.webkit.org/show_bug.cgi?id=196627

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderLayer had isInUserScroll() which is the opposite of ScrollableArea::inProgrammaticScroll(),
so just have ScrollableArea store a ScrollType.

RenderLayer's scrolling bottleneck, scrollToOffset(), now takes a ScrollType, and pushes
it onto the base class.

AsyncScrollingCoordinator::requestScrollPositionUpdate() can use the incoming scrollType (currently
incorrect for iOS WK2 overflow) rather than deducing a user scroll from ScrollingLayerPositionAction.

No behavior change.

  • page/FrameView.cpp:

(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::topContentInsetDidChange):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling const):
(WebCore::FrameView::setWasScrolledByUser):

  • page/FrameViewLayoutContext.cpp:

(WebCore::LayoutScope::LayoutScope):
(WebCore::LayoutScope::~LayoutScope):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::overflowScrollPositionChangedForNode):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::setScrollPosition):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::ScrollableArea):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::currentScrollType const):
(WebCore::ScrollableArea::setCurrentScrollType):
(WebCore::ScrollableArea::setIsUserScroll): Deleted.
(WebCore::ScrollableArea::inProgrammaticScroll const): Deleted.
(WebCore::ScrollableArea::setInProgrammaticScroll): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::scrollToXPosition):
(WebCore::RenderLayer::scrollToYPosition):
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::scrollTo):

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

(WebCore::RenderLayerBacking::updateScrollOffset):

  • rendering/RenderMarquee.cpp:

(WebCore::RenderMarquee::start):

Source/WebKitLegacy/mac:

Send the programmatic scroll type.

  • DOM/DOMHTML.mm:

(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):

5:08 PM Changeset in webkit [243918] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

B3ReduceStrength should know that Mul distributes over Add and Sub
https://bugs.webkit.org/show_bug.cgi?id=196325
<rdar://problem/49441650>

Reviewed by Saam Barati.

Fix some obviously wrong code that was due to an accidental copy-paste.
It made the entire optimization dead code that never ran.

  • b3/B3ReduceStrength.cpp:
4:14 PM Changeset in webkit [243917] by Shawn Roberts
  • 5 edits
    2 deletes in trunk

Unreviewed, rolling out r243868.

Causing timeouts failures on several queues

Reverted changeset:

"[Web Animations] JS wrapper may be deleted while animation is
yet to dispatch its finish event"
https://bugs.webkit.org/show_bug.cgi?id=196118
https://trac.webkit.org/changeset/243868

3:51 PM Changeset in webkit [243916] by Ryan Haddad
  • 3 edits in trunk/Source/WebKit

Unreviewed, rolling out r243888.

Introduced layout test crashes.

Reverted changeset:

"[macOS][iOS] Add filter to syscall sandbox rule"
https://bugs.webkit.org/show_bug.cgi?id=196613
https://trac.webkit.org/changeset/243888

3:47 PM Changeset in webkit [243915] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Disable Flaky API Test TestWebKitAPI.WebKit.FocusTextInputContext
https://bugs.webkit.org/show_bug.cgi?id=196629

Reviewed by Lucas Forschler.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:
3:44 PM Changeset in webkit [243914] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] while waiting in queue status-bubble for testers queues should display build information from builder queue
https://bugs.webkit.org/show_bug.cgi?id=196618

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble): Added QUEUE_TRIGGERS.
(StatusBubble._build_bubble): Get the build from builder if tester has not started the build yet.
(StatusBubble._get_parent_queue): Get the name of the parent (builder) queue.
(StatusBubble.get_latest_build_for_queue): If the queue doesn't have any build yet, return build information from
its parent(builder).

3:42 PM Changeset in webkit [243913] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Status-bubble steps are sometimes displayed in reverse order
https://bugs.webkit.org/show_bug.cgi?id=196625

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble._steps_messages): Explicitly specify order_by('uid').

3:11 PM Changeset in webkit [243912] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Disable Flaky API Test TestWebKitAPI.KeyboardInputTests.KeyboardTypeForInput
https://bugs.webkit.org/show_bug.cgi?id=196630

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3:07 PM Changeset in webkit [243911] by youenn@apple.com
  • 21 edits in trunk

Pass storage quota parameters from UIProcess to NetworkProcess as part of WebsiteDataStore parameters
https://bugs.webkit.org/show_bug.cgi?id=196543

Reviewed by Alex Christensen.

Source/WebCore:

Add a default routine to compute a third party quota from a per origin quota.
No change of behavior.

  • storage/StorageQuotaManager.h:

(WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
(WebCore::StorageQuotaManager::defaultThirdPartyQuota):

Source/WebKit:

Renamed methods used to set cache storage quota to be storage generic
since they will apply to all storage.

Pass quota parameters as part of WebsiteDataStoreParameters from UIProcess
to NetworkProcess (start-up time and new WebsiteDataStore time).

Compute on UIProcess the quota for third party origins using the default rule of dividing by 10.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::initializeStorageQuota):
(WebKit::NetworkProcess::setCacheStorageParameters):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetPerOriginStorageQuota):
(WKWebsiteDataStoreSetCacheStoragePerOriginQuota): Deleted.

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _perOriginStorageQuota]):
(-[WKWebsiteDataStore _setPerOriginStorageQuota:]):
(-[WKWebsiteDataStore _cacheStoragePerOriginQuota]): Deleted.
(-[WKWebsiteDataStore _setCacheStoragePerOriginQuota:]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::perOriginStorageQuota const):
(WebKit::WebsiteDataStore::setPerOriginStorageQuota):
(WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const): Deleted.
(WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota): Deleted.

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::perOriginStorageQuota):
(WebKit::WebsiteDataStoreConfiguration::setPerOriginStorageQuota):
(WebKit::WebsiteDataStoreConfiguration::cacheStoragePerOriginQuota): Deleted.
(WebKit::WebsiteDataStoreConfiguration::setCacheStoragePerOriginQuota): Deleted.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::generatePageConfiguration):

2:59 PM Changeset in webkit [243910] by commit-queue@webkit.org
  • 31 edits
    3 deletes in trunk

Unreviewed, rolling out r243807 and r243824.
https://bugs.webkit.org/show_bug.cgi?id=196611

Test added is a flaky timeout on iOS Simulator, 3 tests
unskipped are flaky failures (Requested by ShawnRoberts on
#webkit).

Reverted changesets:

"Blob type cannot be stored correctly in IDB when
IDBObjectStore has autoIncrement and keyPath options"
https://bugs.webkit.org/show_bug.cgi?id=196128
https://trac.webkit.org/changeset/243807

"Follow up fix for r243807: Use MarkedArgumentBuffer instead
of Vector for JSValue"
https://bugs.webkit.org/show_bug.cgi?id=196547
https://trac.webkit.org/changeset/243824

2:56 PM Changeset in webkit [243909] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

Changing default website policies shouldn't change default website policies in subsequent navigations
https://bugs.webkit.org/show_bug.cgi?id=196562
<rdar://problem/49573377>

Reviewed by Tim Horton.

Currently, changing the default WKWebpagePreferences object when deciding navigation policy causes the set of
default policies to change in subsequent navigations. Among other things, this prevents clients from passing
a modified version of the default website policies into the decision handler without impacting future
navigations. To fix this, teach API::WebsitePolicies to make a copy of itself, and then use this to pass a copy
of the default website policies to the navigation delegate when deciding navigation policies.

Test: DoNotAllowChangingDefaultWebpagePreferencesInDelegateMethod

  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):

Add a helper method to copy a set of website policies.

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

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

2:47 PM Changeset in webkit [243908] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix rare crash under collectRelatedCoordinatedScrollingNodes()
https://bugs.webkit.org/show_bug.cgi?id=196610
rdar://problem/49595426

Reviewed by Zalan Bujtas.

hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
needs to check whether there's backing.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::collectRelatedCoordinatedScrollingNodes):

2:39 PM Changeset in webkit [243907] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for CLoop after r243886

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegistersForUnwinding):

  • interpreter/StackVisitor.h:
2:13 PM Changeset in webkit [243906] by sbarati@apple.com
  • 1 edit
    1 add in trunk/JSTests

createRegExpMatchesArray does not respect inferred types
https://bugs.webkit.org/show_bug.cgi?id=193287

Reviewed by Yusuke Suzuki.

This checks in the test case for 193287. This issue was discovered by
Samuel Groß of Google Project Zero.

  • stress/inferred-types-regex-matches-array.js: Added.
2:10 PM Changeset in webkit [243905] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Move "inProgrammaticScroll" down to ScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=196614

Reviewed by Zalan Bujtas.

A future patch will need to update "inProgrammaticScroll" on RenderLayers, so push
inProgrammaticScroll() down to ScrollableArea.

ScrollableArea already has "isScrolledProgrammatically", which I rename to "scrollShouldClearLatchedState"
to reduce confusion. It might be possible to remove this in future with some refactoring.

Sadly we can no longer use SetForScope<> in FrameView after this change so add some manual save/restore code.

  • dom/Element.cpp:

(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):

  • page/EventHandler.cpp:

(WebCore::EventHandler::completeWidgetWheelEvent):
(WebCore::EventHandler::handleWheelEvent):

  • page/FrameView.cpp:

(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::topContentInsetDidChange):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::setWasScrolledByUser):

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

(WebCore::ScrollView::inProgrammaticScroll const): Deleted.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::ScrollableArea):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::inProgrammaticScroll const):
(WebCore::ScrollableArea::setInProgrammaticScroll):
(WebCore::ScrollableArea::scrollShouldClearLatchedState const):
(WebCore::ScrollableArea::setScrollShouldClearLatchedState):
(WebCore::ScrollableArea::isScrolledProgrammatically const): Deleted.
(WebCore::ScrollableArea::setScrolledProgrammatically): Deleted.

1:54 PM Changeset in webkit [243904] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

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

#if !ENABLE(C_LOOP) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0
does not work well (Requested by yusukesuzuki on #webkit).

Reverted changeset:

"Unreviewed, build fix for CLoop and Windows after r243886"
https://bugs.webkit.org/show_bug.cgi?id=196387
https://trac.webkit.org/changeset/243898

1:53 PM Changeset in webkit [243903] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Leak of UniqueIDBDatabase in network process running layout tests
https://bugs.webkit.org/show_bug.cgi?id=196565
<rdar://problem/49346139>

Reviewed by Geoffrey Garen.

UniqueIDBDatabase will null itself after it receives confirmation about connecton close from its clients, but it
is possible that the web process to network process connection closes before servers gets the
confirmDidCloseFromServer. Therefore, we should let UniqueIDBDatabase forget connection when it receives a
conenctionClosedFromClient.

No new test because this bug is caused by race between network receiving conenctionClosedFromClient and
receiving confirmDidCloseFromServer. This is testable by running some existing layout tests in a row with leak
option.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):

1:51 PM Changeset in webkit [243902] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix -Wreturn-type warning

  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::ownerProcess):

1:47 PM Changeset in webkit [243901] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix iOS build with recent SDKs.

  • platform/gamepad/cocoa/GameControllerGamepad.mm:

(WebCore::GameControllerGamepad::GameControllerGamepad):

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

[macOS] Fix sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=196616
<rdar://problem/49498040>

Reviewed by Brent Fulgham.

Fix some observed sandbox violations in the WebContent process on macOS.

  • WebProcess/com.apple.WebProcess.sb.in:
1:44 PM Changeset in webkit [243899] by eric.carlson@apple.com
  • 20 edits
    2 adds in trunk

[MediaStream] Host should be able to mute screen capture and camera/microphone independently
https://bugs.webkit.org/show_bug.cgi?id=196555
<rdar://problem/47303865>

Reviewed by Youenn Fablet.

Source/WebCore:

Test: fast/mediastream/media-stream-page-muted.html

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::MediaStream): Call setCaptureTracksMuted to pass page muted
state to tracks.
(WebCore::MediaStream::startProducingData): Ditto.
(WebCore::MediaStream::setCaptureTracksMuted): New.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::MediaStreamTrack): Call setMuted with page muted state.
(WebCore::MediaStreamTrack::setMuted): Set muted according to page state and source type.
(WebCore::MediaStreamTrack::pageMutedStateDidChange): Call setMuted.
(WebCore::MediaStreamTrack::mediaState const): Update for new page state.

  • Modules/mediastream/MediaStreamTrack.h:
  • page/MediaProducer.h: Split capture muted state into two: camera/microphone and screen.
  • page/Page.h:

(WebCore::Page::isMediaCaptureMuted const): Update for state changes.

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::setCaptureTracksMuted): Deleted.
(WebCore::MediaStreamPrivate::hasCaptureVideoSource const): Deleted.

  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setMuted): Log state.
(WebCore::RealtimeMediaSource::notifyMutedChange): Call notifyMutedObservers on the
next runloop so events aren't dispatched synchronously.

  • testing/Internals.cpp:

(WebCore::Internals::setPageMuted): Add new state.

Source/WebKit:

  • UIProcess/API/C/WKPagePrivate.h: Add kWKMediaScreenCaptureMuted.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setPageMuted:]):
(-[WKWebView _setMediaCaptureMuted:]): Deleted, it was unused.
(-[WKWebView _muteMediaCapture]): Deleted, it was unused.

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

(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest): Fix
a log comment typo.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setMediaStreamCaptureMuted): Use the new flag.
(WebKit::WebPageProxy::activateMediaStreamCaptureInPage): Ditto.
(WebKit::WebPageProxy::setMuted): Ditto.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isMediaStreamCaptureMuted const): Ditto.

LayoutTests:

  • fast/mediastream/media-stream-page-muted-expected.txt: Added.
  • fast/mediastream/media-stream-page-muted.html: Added.
  • fast/mediastream/media-stream-track-interrupted.html: Read page muted state before

interrupting capture track because the page state now changes immediately.

  • fast/mediastream/media-stream-track-muted.html: Ditto, for muting.
1:41 PM Changeset in webkit [243898] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for CLoop and Windows after r243886
https://bugs.webkit.org/show_bug.cgi?id=196387

RegisterAtOffsetList does not exist if ENABLE(ASSEMBLER) is false.

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegistersForUnwinding):

  • interpreter/StackVisitor.h:
1:38 PM Changeset in webkit [243897] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Status bubble should not display skipped buildbot steps
https://bugs.webkit.org/show_bug.cgi?id=196584

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
1:34 PM Changeset in webkit [243896] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] configure localhost as BUILDBOT_SERVER_HOST in testing mode
https://bugs.webkit.org/show_bug.cgi?id=196620

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/config.py:
1:34 PM Changeset in webkit [243895] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, update r243884 to use macros in Compiler.h instead.

  • platform/ios/LegacyTileGrid.mm:

(WebCore::LegacyTileGrid::dropDistantTiles):

1:31 PM Changeset in webkit [243894] by Chris Fleizach
  • 2 edits in trunk/Source/WebCore

AX: Crash under WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored()
https://bugs.webkit.org/show_bug.cgi?id=196600
<rdar://problem/49572996>

Reviewed by Joanmarie Diggs.

Audit AX code to not dereference renderer before checking if it's null.
Not clear how to reproduce at this time.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::webAreaIsPresentational):
(WebCore::AccessibilityRenderObject::layoutCount const):
(WebCore::AccessibilityRenderObject::widget const):

1:28 PM Changeset in webkit [243893] by Antti Koivisto
  • 19 edits
    8 adds in trunk

Compute accurate regions for touch-action
https://bugs.webkit.org/show_bug.cgi?id=196536
<rdar://problem/49516022>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: pointerevents/ios/touch-action-region-basic.html

pointerevents/ios/touch-action-region-layers.html
pointerevents/ios/touch-action-region-pan-x-y.html

  • Use style system to compute effective touch-action without additional tree walks.
  • Compute touch-action region in a fake paint, at the same time with the event region.

This patch doesn't yet use the computed region for anything except test output.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleResolver.cpp:

(WebCore::computeEffectiveTouchActions):
(WebCore::StyleResolver::adjustRenderStyle):

Update RenderStyle::effectiveTouchAction.

  • dom/Element.cpp:

(WebCore::Element::computedTouchActions const):

Just get it from the style.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::setEventRegion):
(WebCore::GraphicsLayer::setTouchActionRegion):
(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::touchActionRegion const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setTouchActionRegion):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/PaintInfo.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintObject):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::collectEventRegionForFragments):

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

(WebCore::RenderLayerBacking::updateConfiguration):

Need to do this for the top compositing layer too.

(WebCore::RenderLayerBacking::updateEventRegion):

Compute touch-action region too.
As a basic optimization avoid doing any extra work if there are no elements with non-default touch-action property.

  • rendering/TouchActionRegion.cpp: Added.

(WebCore::toIndex):
(WebCore::toTouchAction):
(WebCore::toString):
(WebCore::TouchActionRegion::unite):
(WebCore::TouchActionRegion::actionsForPoint const):
(WebCore::TouchActionRegion::translate):
(WebCore::operator<<):

  • rendering/TouchActionRegion.h: Added.

Class for collecting and maintaining touch-action region.

(WebCore::TouchActionRegion::isEmpty const):
(WebCore::TouchActionRegion::operator== const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::effectiveTouchActions const):
(WebCore::RenderStyle::setEffectiveTouchActions):

Implement as inherited property for efficiency (touch-action itself is non-inherited).

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:

LayoutTests:

  • pointerevents/ios/touch-action-region-basic-expected.txt: Added.
  • pointerevents/ios/touch-action-region-basic.html: Added.
  • pointerevents/ios/touch-action-region-layers-expected.txt: Added.
  • pointerevents/ios/touch-action-region-layers.html: Added.
  • pointerevents/ios/touch-action-region-pan-x-y-expected.txt: Added.
  • pointerevents/ios/touch-action-region-pan-x-y.html: Added.
1:24 PM Changeset in webkit [243892] by Alan Coon
  • 7 edits in tags/Safari-608.1.15/Source

Versioning.

1:20 PM Changeset in webkit [243891] by Alan Coon
  • 1 copy in tags/Safari-608.1.15

Tag Safari-608.1.15.

1:08 PM Changeset in webkit [243890] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix linking error because the build of RTCIceTransport.cpp is handled in Xcode project side accidentally
https://bugs.webkit.org/show_bug.cgi?id=196475

We did not have RTCIceTransport.cpp in Sources.txt.

  • WebCore.xcodeproj/project.pbxproj:
1:08 PM Changeset in webkit [243889] by Alan Coon
  • 7 edits in trunk/Source

Versioning.

12:13 PM Changeset in webkit [243888] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS][iOS] Add filter to syscall sandbox rule
https://bugs.webkit.org/show_bug.cgi?id=196613
<rdar://problem/49531420>

Reviewed by Brent Fulgham.

This will restrict the existing sandbox rule for the syscall.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
12:07 PM Changeset in webkit [243887] by ysuzuki@apple.com
  • 355 edits
    3 copies
    5 adds in trunk/Source

[WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
https://bugs.webkit.org/show_bug.cgi?id=196475

Reviewed by Saam Barati.

Source/bmalloc:

Add MAKE_BISO_MALLOCED_IMPL_TEMPLATE, which can be used for explicit specialization for template classes.

  • bmalloc/IsoHeap.h:
  • bmalloc/IsoHeapInlines.h:

Source/WebCore:

This patch puts most of derived classes of ScriptWrappable into IsoHeap. We do not include derived classes of Event simply
because Internal repository code also inherits it. After watching the result of this patch, we will try Event and its derived
classes into IsoHeap too.

This patch makes the following things IsoHeap-allocated. These classes are listed by using lldb python script.

  1. DOM collections (HTMLCollection etc.)
  2. WebAudio nodes
  3. IDB classes
  4. FileSystem API classes
  5. Canvas contexts
  6. WebRTC classses
  7. XMLHttpRequest related classes
  8. WebSocket related classes
  9. Worker and Worklet related classes
  10. Other misc classes
  • Modules/applepay/ApplePaySession.cpp:
  • Modules/applepay/ApplePaySession.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:
  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
  • Modules/entriesapi/DOMFileSystem.cpp:
  • Modules/entriesapi/DOMFileSystem.h:

(WebCore::DOMFileSystem::createEntryForFile): Deleted.
(WebCore::DOMFileSystem::name const): Deleted.

  • Modules/entriesapi/FileSystemDirectoryEntry.h:
  • Modules/entriesapi/FileSystemDirectoryReader.cpp:
  • Modules/entriesapi/FileSystemDirectoryReader.h:
  • Modules/entriesapi/FileSystemEntry.cpp:
  • Modules/entriesapi/FileSystemEntry.h:
  • Modules/entriesapi/FileSystemFileEntry.h:
  • Modules/geolocation/Geolocation.cpp:
  • Modules/geolocation/Geolocation.h:

(WebCore::Geolocation::document const): Deleted.
(WebCore::Geolocation::frame const): Deleted.
(WebCore::Geolocation::resetIsAllowed): Deleted.
(WebCore::Geolocation::isAllowed const): Deleted.
(WebCore::Geolocation::isDenied const): Deleted.
(WebCore::Geolocation::hasListeners const): Deleted.

  • Modules/indexeddb/IDBCursor.cpp:
  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBCursorWithValue.cpp:
  • Modules/indexeddb/IDBCursorWithValue.h:
  • Modules/indexeddb/IDBDatabase.cpp:
  • Modules/indexeddb/IDBDatabase.h:

(WebCore::IDBDatabase::info const): Deleted.
(WebCore::IDBDatabase::databaseConnectionIdentifier const): Deleted.
(WebCore::IDBDatabase::connectionProxy): Deleted.
(WebCore::IDBDatabase::isClosingOrClosed const): Deleted.

  • Modules/indexeddb/IDBKeyRange.cpp:
  • Modules/indexeddb/IDBKeyRange.h:

(WebCore::IDBKeyRange::lower const): Deleted.
(WebCore::IDBKeyRange::upper const): Deleted.
(WebCore::IDBKeyRange::lowerOpen const): Deleted.
(WebCore::IDBKeyRange::upperOpen const): Deleted.

  • Modules/indexeddb/IDBOpenDBRequest.cpp:
  • Modules/indexeddb/IDBOpenDBRequest.h:
  • Modules/indexeddb/IDBRequest.cpp:
  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:
  • Modules/indexeddb/IDBTransaction.h:

(WebCore::IDBTransaction::mode const): Deleted.
(WebCore::IDBTransaction::info const): Deleted.
(WebCore::IDBTransaction::database): Deleted.
(WebCore::IDBTransaction::database const): Deleted.
(WebCore::IDBTransaction::originalDatabaseInfo const): Deleted.
(WebCore::IDBTransaction::isVersionChange const): Deleted.
(WebCore::IDBTransaction::isReadOnly const): Deleted.
(WebCore::IDBTransaction::isFinished const): Deleted.

  • Modules/mediarecorder/MediaRecorder.cpp:
  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediasession/MediaRemoteControls.cpp:
  • Modules/mediasession/MediaRemoteControls.h:

(WebCore::MediaRemoteControls::create): Deleted.
(WebCore::MediaRemoteControls::previousTrackEnabled const): Deleted.
(WebCore::MediaRemoteControls::nextTrackEnabled const): Deleted.

  • Modules/mediasource/MediaSource.cpp:
  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:
  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBufferList.cpp:
  • Modules/mediasource/SourceBufferList.h:
  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/mediastream/MediaDeviceInfo.cpp:
  • Modules/mediastream/MediaDeviceInfo.h:

(WebCore::MediaDeviceInfo::label const): Deleted.
(WebCore::MediaDeviceInfo::deviceId const): Deleted.
(WebCore::MediaDeviceInfo::groupId const): Deleted.
(WebCore::MediaDeviceInfo::kind const): Deleted.

  • Modules/mediastream/MediaDevices.cpp:
  • Modules/mediastream/MediaDevices.h:
  • Modules/mediastream/MediaStream.cpp:
  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamTrack.cpp:
  • Modules/mediastream/MediaStreamTrack.h:
  • Modules/mediastream/RTCDTMFSender.cpp:
  • Modules/mediastream/RTCDTMFSender.h:
  • Modules/mediastream/RTCDataChannel.cpp:
  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/RTCIceCandidate.cpp:
  • Modules/mediastream/RTCIceCandidate.h:

(WebCore::RTCIceCandidate::candidate const): Deleted.
(WebCore::RTCIceCandidate::sdpMid const): Deleted.
(WebCore::RTCIceCandidate::sdpMLineIndex const): Deleted.
(WebCore::RTCIceCandidate::setCandidate): Deleted.

  • Modules/mediastream/RTCIceTransport.cpp:
  • Modules/mediastream/RTCIceTransport.h:

(WebCore::RTCIceTransport::create): Deleted.
(WebCore::RTCIceTransport::state const): Deleted.
(WebCore::RTCIceTransport::setState): Deleted.
(WebCore::RTCIceTransport::gatheringState const): Deleted.
(WebCore::RTCIceTransport::setGatheringState): Deleted.
(WebCore::RTCIceTransport::RTCIceTransport): Deleted.

  • Modules/mediastream/RTCPeerConnection.cpp:
  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpReceiver.cpp:
  • Modules/mediastream/RTCRtpReceiver.h:

(WebCore::RTCRtpReceiver::create): Deleted.
(WebCore::RTCRtpReceiver::setBackend): Deleted.
(WebCore::RTCRtpReceiver::getParameters): Deleted.
(WebCore::RTCRtpReceiver::getContributingSources const): Deleted.
(WebCore::RTCRtpReceiver::getSynchronizationSources const): Deleted.
(WebCore::RTCRtpReceiver::track): Deleted.
(WebCore::RTCRtpReceiver::backend): Deleted.

  • Modules/mediastream/RTCRtpSender.cpp:
  • Modules/mediastream/RTCRtpSender.h:

(WebCore::RTCRtpSender::track): Deleted.
(WebCore::RTCRtpSender::trackId const): Deleted.
(WebCore::RTCRtpSender::trackKind const): Deleted.
(WebCore::RTCRtpSender::mediaStreamIds const): Deleted.
(WebCore::RTCRtpSender::setMediaStreamIds): Deleted.
(WebCore::RTCRtpSender::isStopped const): Deleted.
(WebCore::RTCRtpSender::backend): Deleted.

  • Modules/mediastream/RTCRtpTransceiver.cpp:
  • Modules/mediastream/RTCRtpTransceiver.h:

(WebCore::RTCRtpTransceiver::create): Deleted.
(WebCore::RTCRtpTransceiver::sender): Deleted.
(WebCore::RTCRtpTransceiver::receiver): Deleted.
(WebCore::RTCRtpTransceiver::iceTransport): Deleted.
(WebCore::RTCRtpTransceiver::backend): Deleted.

  • Modules/mediastream/RTCSessionDescription.cpp:
  • Modules/mediastream/RTCSessionDescription.h:

(WebCore::RTCSessionDescription::type const): Deleted.
(WebCore::RTCSessionDescription::sdp const): Deleted.
(WebCore::RTCSessionDescription::setSdp): Deleted.

  • Modules/notifications/Notification.cpp:
  • Modules/notifications/Notification.h:
  • Modules/paymentrequest/PaymentRequest.cpp:
  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentResponse.cpp:
  • Modules/paymentrequest/PaymentResponse.h:
  • Modules/speech/SpeechSynthesisUtterance.cpp:
  • Modules/speech/SpeechSynthesisUtterance.h:
  • Modules/webaudio/AnalyserNode.cpp:
  • Modules/webaudio/AnalyserNode.h:
  • Modules/webaudio/AudioBasicInspectorNode.cpp:
  • Modules/webaudio/AudioBasicInspectorNode.h:
  • Modules/webaudio/AudioBasicProcessorNode.cpp:
  • Modules/webaudio/AudioBasicProcessorNode.h:
  • Modules/webaudio/AudioBufferSourceNode.cpp:
  • Modules/webaudio/AudioBufferSourceNode.h:
  • Modules/webaudio/AudioContext.cpp:
  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/AudioDestinationNode.cpp:
  • Modules/webaudio/AudioDestinationNode.h:
  • Modules/webaudio/AudioNode.cpp:
  • Modules/webaudio/AudioNode.h:
  • Modules/webaudio/AudioScheduledSourceNode.cpp:
  • Modules/webaudio/AudioScheduledSourceNode.h:
  • Modules/webaudio/BiquadFilterNode.cpp:
  • Modules/webaudio/BiquadFilterNode.h:
  • Modules/webaudio/ChannelMergerNode.cpp:
  • Modules/webaudio/ChannelMergerNode.h:
  • Modules/webaudio/ChannelSplitterNode.cpp:
  • Modules/webaudio/ChannelSplitterNode.h:
  • Modules/webaudio/ConvolverNode.cpp:
  • Modules/webaudio/ConvolverNode.h:
  • Modules/webaudio/DefaultAudioDestinationNode.cpp:
  • Modules/webaudio/DefaultAudioDestinationNode.h:
  • Modules/webaudio/DelayNode.cpp:
  • Modules/webaudio/DelayNode.h:
  • Modules/webaudio/DynamicsCompressorNode.cpp:
  • Modules/webaudio/DynamicsCompressorNode.h:
  • Modules/webaudio/GainNode.cpp:
  • Modules/webaudio/GainNode.h:
  • Modules/webaudio/MediaElementAudioSourceNode.cpp:
  • Modules/webaudio/MediaElementAudioSourceNode.h:
  • Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
  • Modules/webaudio/MediaStreamAudioDestinationNode.h:
  • Modules/webaudio/MediaStreamAudioSourceNode.cpp:
  • Modules/webaudio/MediaStreamAudioSourceNode.h:
  • Modules/webaudio/OfflineAudioContext.cpp:
  • Modules/webaudio/OfflineAudioContext.h:
  • Modules/webaudio/OfflineAudioDestinationNode.cpp:
  • Modules/webaudio/OfflineAudioDestinationNode.h:
  • Modules/webaudio/OscillatorNode.cpp:
  • Modules/webaudio/OscillatorNode.h:
  • Modules/webaudio/PannerNode.cpp:
  • Modules/webaudio/PannerNode.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:
  • Modules/webaudio/ScriptProcessorNode.h:
  • Modules/webaudio/WaveShaperNode.cpp:
  • Modules/webaudio/WaveShaperNode.h:
  • Modules/webgpu/GPUCanvasContext.cpp:
  • Modules/webgpu/GPUCanvasContext.h:
  • Modules/websockets/WebSocket.cpp:
  • Modules/websockets/WebSocket.h:
  • Modules/webvr/VRDisplay.cpp:
  • Modules/webvr/VRDisplay.h:

(WebCore::VRDisplay::isPresenting const): Deleted.
(WebCore::VRDisplay::displayName const): Deleted.
(WebCore::VRDisplay::displayId const): Deleted.
(WebCore::VRDisplay::depthNear const): Deleted.
(WebCore::VRDisplay::setDepthNear): Deleted.
(WebCore::VRDisplay::depthFar const): Deleted.
(WebCore::VRDisplay::setDepthFar): Deleted.
(WebCore::VRDisplay::document): Deleted.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/CSSAnimation.cpp:
  • animation/CSSAnimation.h:
  • animation/CSSTransition.cpp:
  • animation/CSSTransition.h:
  • animation/DeclarativeAnimation.cpp:
  • animation/DeclarativeAnimation.h:
  • animation/WebAnimation.cpp:
  • animation/WebAnimation.h:
  • bindings/js/ScriptWrappable.h:
  • css/CSSComputedStyleDeclaration.cpp:
  • css/CSSComputedStyleDeclaration.h:
  • css/CSSStyleDeclaration.cpp:

(): Deleted.

  • css/CSSStyleDeclaration.h:
  • css/DOMMatrix.h:
  • css/DOMMatrixReadOnly.cpp:
  • css/DOMMatrixReadOnly.h:
  • css/FontFaceSet.cpp:
  • css/FontFaceSet.h:
  • css/PropertySetCSSStyleDeclaration.cpp:
  • css/PropertySetCSSStyleDeclaration.h:
  • css/WebKitCSSMatrix.cpp:
  • css/WebKitCSSMatrix.h:
  • css/typedom/TypedOMCSSImageValue.cpp: Added.
  • css/typedom/TypedOMCSSImageValue.h:
  • css/typedom/TypedOMCSSNumericValue.cpp: Added.
  • css/typedom/TypedOMCSSNumericValue.h:
  • css/typedom/TypedOMCSSStyleValue.cpp: Added.
  • css/typedom/TypedOMCSSStyleValue.h:
  • css/typedom/TypedOMCSSUnitValue.cpp: Added.
  • css/typedom/TypedOMCSSUnitValue.h:
  • css/typedom/TypedOMCSSUnparsedValue.cpp: Added.
  • css/typedom/TypedOMCSSUnparsedValue.h:
  • dom/AbortController.cpp:
  • dom/AbortController.h:
  • dom/AbortSignal.cpp:
  • dom/AbortSignal.h:
  • dom/AllDescendantsCollection.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
  • dom/AllDescendantsCollection.h:
  • dom/ChildNodeList.cpp:
  • dom/ChildNodeList.h:
  • dom/ClassCollection.cpp:
  • dom/ClassCollection.h:
  • dom/DOMImplementation.cpp:
  • dom/DOMImplementation.h:

(WebCore::DOMImplementation::ref): Deleted.
(WebCore::DOMImplementation::deref): Deleted.
(WebCore::DOMImplementation::document): Deleted.
(WebCore::DOMImplementation::hasFeature): Deleted.

  • dom/DOMPoint.h:
  • dom/DOMPointReadOnly.cpp:
  • dom/DOMPointReadOnly.h:
  • dom/DOMQuad.cpp:
  • dom/DOMQuad.h:
  • dom/DOMRect.h:
  • dom/DOMRectReadOnly.cpp: Copied from Source/WebCore/dom/DOMPointReadOnly.cpp.
  • dom/DOMRectReadOnly.h:
  • dom/DataTransferItemList.cpp:
  • dom/DataTransferItemList.h:

(WebCore::DataTransferItemList::ref): Deleted.
(WebCore::DataTransferItemList::deref): Deleted.
(WebCore::DataTransferItemList::dataTransfer): Deleted.
(WebCore::DataTransferItemList::hasItems const): Deleted.
(WebCore::DataTransferItemList::items const): Deleted.

  • dom/DatasetDOMStringMap.cpp:
  • dom/DatasetDOMStringMap.h:
  • dom/DocumentParser.h:
  • dom/EventTarget.cpp:
  • dom/EventTarget.h:
  • dom/LiveNodeList.cpp:
  • dom/LiveNodeList.h:
  • dom/MessageChannel.cpp:
  • dom/MessagePort.cpp:
  • dom/MessagePort.h:
  • dom/NameNodeList.cpp:
  • dom/NameNodeList.h:
  • dom/NamedNodeMap.cpp:
  • dom/NamedNodeMap.h:

(WebCore::NamedNodeMap::NamedNodeMap): Deleted.
(WebCore::NamedNodeMap::element): Deleted.

  • dom/NodeIterator.cpp:
  • dom/NodeIterator.h:

(WebCore::NodeIterator::detach): Deleted.
(WebCore::NodeIterator::referenceNode const): Deleted.
(WebCore::NodeIterator::pointerBeforeReferenceNode const): Deleted.

  • dom/NodeList.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
  • dom/NodeList.h:
  • dom/NodeRareData.cpp:
  • dom/ScriptExecutionContext.cpp:
  • dom/SimulatedClick.cpp:
  • dom/StaticNodeList.cpp:
  • dom/StaticNodeList.h:
  • dom/TagCollection.cpp:
  • dom/TagCollection.h:
  • dom/TreeWalker.cpp:
  • dom/TreeWalker.h:

(WebCore::TreeWalker::create): Deleted.
(WebCore::TreeWalker::currentNode): Deleted.
(WebCore::TreeWalker::currentNode const): Deleted.

  • fileapi/Blob.cpp:
  • fileapi/Blob.h:
  • fileapi/File.cpp:
  • fileapi/File.h:
  • fileapi/FileList.cpp:
  • fileapi/FileList.h:

(WebCore::FileList::create): Deleted.
(WebCore::FileList::length const): Deleted.
(WebCore::FileList::isEmpty const): Deleted.
(WebCore::FileList::files const): Deleted.
(WebCore::FileList::file const): Deleted.
(WebCore::FileList::FileList): Deleted.
(WebCore::FileList::append): Deleted.
(WebCore::FileList::clear): Deleted.

  • fileapi/FileReader.cpp:
  • fileapi/FileReader.h:
  • html/CachedHTMLCollection.h:
  • html/GenericCachedHTMLCollection.cpp:
  • html/GenericCachedHTMLCollection.h:
  • html/HTMLAllCollection.cpp:
  • html/HTMLAllCollection.h:
  • html/HTMLCollection.cpp:
  • html/HTMLCollection.h:
  • html/HTMLFormControlsCollection.cpp:
  • html/HTMLFormControlsCollection.h:
  • html/HTMLNameCollection.cpp:
  • html/HTMLNameCollection.h:
  • html/HTMLOptionsCollection.cpp:
  • html/HTMLOptionsCollection.h:
  • html/HTMLTableRowsCollection.cpp:
  • html/HTMLTableRowsCollection.h:
  • html/ImageBitmap.cpp:
  • html/ImageBitmap.h:

(WebCore::ImageBitmap::isDetached const): Deleted.
(WebCore::ImageBitmap::buffer): Deleted.
(WebCore::ImageBitmap::originClean const): Deleted.

  • html/LabelsNodeList.cpp:
  • html/LabelsNodeList.h:
  • html/MediaController.cpp:
  • html/MediaController.h:
  • html/OffscreenCanvas.cpp:
  • html/OffscreenCanvas.h:
  • html/RadioNodeList.cpp:
  • html/RadioNodeList.h:
  • html/canvas/CanvasRenderingContext.cpp:
  • html/canvas/CanvasRenderingContext.h:
  • html/canvas/CanvasRenderingContext2D.cpp:
  • html/canvas/CanvasRenderingContext2D.h:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasRenderingContext2DBase.h:
  • html/canvas/GPUBasedCanvasRenderingContext.h:
  • html/canvas/ImageBitmapRenderingContext.cpp:
  • html/canvas/ImageBitmapRenderingContext.h:
  • html/canvas/OffscreenCanvasRenderingContext2D.cpp:
  • html/canvas/OffscreenCanvasRenderingContext2D.h:
  • html/canvas/PaintRenderingContext2D.cpp:
  • html/canvas/PaintRenderingContext2D.h:
  • html/canvas/PlaceholderRenderingContext.cpp:
  • html/canvas/PlaceholderRenderingContext.h:
  • html/canvas/WebGL2RenderingContext.cpp:
  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLRenderingContext.cpp:
  • html/canvas/WebGLRenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.cpp:
  • html/canvas/WebGLRenderingContextBase.h:
  • html/track/AudioTrackList.h:
  • html/track/DataCue.cpp:
  • html/track/DataCue.h:
  • html/track/InbandDataTextTrack.cpp:
  • html/track/InbandDataTextTrack.h:
  • html/track/InbandGenericTextTrack.cpp:
  • html/track/InbandGenericTextTrack.h:
  • html/track/InbandTextTrack.cpp:
  • html/track/InbandTextTrack.h:
  • html/track/InbandWebVTTTextTrack.cpp:
  • html/track/InbandWebVTTTextTrack.h:
  • html/track/LoadableTextTrack.cpp:
  • html/track/LoadableTextTrack.h:
  • html/track/TextTrack.cpp:
  • html/track/TextTrack.h:
  • html/track/TextTrackCue.cpp:
  • html/track/TextTrackCue.h:
  • html/track/TextTrackCueGeneric.cpp:
  • html/track/TextTrackCueGeneric.h:
  • html/track/TextTrackList.cpp:
  • html/track/TextTrackList.h:
  • html/track/TrackListBase.cpp:
  • html/track/TrackListBase.h:
  • html/track/VTTCue.cpp:
  • html/track/VTTCue.h:
  • html/track/VideoTrackList.h:
  • loader/appcache/DOMApplicationCache.cpp:
  • loader/appcache/DOMApplicationCache.h:
  • page/AbstractDOMWindow.cpp:
  • page/AbstractDOMWindow.h:
  • page/BarProp.cpp:
  • page/BarProp.h:

(WebCore::BarProp::create): Deleted.

  • page/DOMWindow.cpp:
  • page/DOMWindow.h:
  • page/EventSource.cpp:
  • page/EventSource.h:
  • page/History.cpp:
  • page/History.h:
  • page/Location.cpp:
  • page/Location.h:

(WebCore::Location::create): Deleted.
(WebCore::Location::toString const): Deleted.

  • page/Navigator.cpp:
  • page/Navigator.h:
  • page/Performance.cpp:
  • page/Performance.h:
  • page/RemoteDOMWindow.cpp:
  • page/RemoteDOMWindow.h:
  • page/Screen.cpp:
  • page/Screen.h:
  • page/VisualViewport.cpp:
  • page/VisualViewport.h:
  • plugins/DOMMimeTypeArray.cpp:
  • plugins/DOMMimeTypeArray.h:

(WebCore::DOMMimeTypeArray::create): Deleted.

  • plugins/DOMPlugin.cpp:
  • plugins/DOMPlugin.h:

(WebCore::DOMPlugin::create): Deleted.

  • plugins/DOMPluginArray.cpp:
  • plugins/DOMPluginArray.h:

(WebCore::DOMPluginArray::create): Deleted.

  • storage/Storage.cpp:
  • storage/Storage.h:

(WebCore::Storage::area const): Deleted.

  • workers/AbstractWorker.cpp:
  • workers/AbstractWorker.h:
  • workers/DedicatedWorkerGlobalScope.cpp:
  • workers/DedicatedWorkerGlobalScope.h:
  • workers/Worker.cpp:
  • workers/Worker.h:
  • workers/WorkerGlobalScope.cpp:
  • workers/WorkerGlobalScope.h:
  • workers/service/ServiceWorker.cpp:
  • workers/service/ServiceWorker.h:
  • workers/service/ServiceWorkerContainer.cpp:
  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerGlobalScope.cpp:
  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/ServiceWorkerRegistration.cpp:
  • workers/service/ServiceWorkerRegistration.h:
  • worklets/PaintWorkletGlobalScope.cpp:
  • worklets/PaintWorkletGlobalScope.h:
  • worklets/Worklet.cpp:
  • worklets/Worklet.h:
  • worklets/WorkletGlobalScope.cpp:
  • worklets/WorkletGlobalScope.h:
  • xml/XMLHttpRequest.cpp:
  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequestEventTarget.h:
  • xml/XMLHttpRequestUpload.cpp:
  • xml/XMLHttpRequestUpload.h:
  • xml/XPathParser.cpp:

Source/WTF:

  • wtf/ForbidHeapAllocation.h:
  • wtf/IsoMalloc.h:
  • wtf/IsoMallocInlines.h:
11:54 AM Changeset in webkit [243886] by sbarati@apple.com
  • 32 edits
    4 copies in trunk

Teach Call ICs how to call Wasm
https://bugs.webkit.org/show_bug.cgi?id=196387

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/stack-trace.js:

Source/JavaScriptCore:

This patch teaches JS to call Wasm without going through the native thunk.
Currently, we emit a JIT "JS" callee stub which marshals arguments from
JS to Wasm. Like the native version of this, this thunk is responsible
for saving and restoring the VM's current Wasm context. Instead of emitting
an exception handler, we also teach the unwinder how to read the previous
wasm context to restore it as it unwindws past this frame.

This patch is straight forward, and leaves some areas for perf improvement:

  • We can teach the DFG/FTL to directly use the Wasm calling convention when it knows it's calling a single Wasm function. This way we don't shuffle registers to the stack and then back into registers.
  • We bail out to the slow path for mismatched arity. I opened a bug to fix optimize arity check failures: https://bugs.webkit.org/show_bug.cgi?id=196564
  • We bail out to the slow path Double JSValues flowing into i32 arguments. We should teach this thunk how to do that conversion directly.

This patch also refactors the code to explicitly have a single pinned size register.
We used pretend in some places that we could have more than one pinned size register.
However, there was other code that just asserted the size was one. This patch just rips
out this code since we never moved to having more than one pinned size register. Doing
this refactoring cleans up the various places where we set up the size register.

This patch is a 50-60% progression on JetStream 2's richards-wasm.

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

(JSC::MacroAssemblerCodeRef::operator=):
(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::operator() const):
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegistersForUnwinding):
(JSC::StackVisitor::Frame::calleeSaveRegisters): Deleted.

  • interpreter/StackVisitor.h:
  • jit/JITOperations.cpp:
  • jit/RegisterSet.cpp:

(JSC::RegisterSet::runtimeTagRegisters):
(JSC::RegisterSet::specialRegisters):
(JSC::RegisterSet::runtimeRegisters): Deleted.

  • jit/RegisterSet.h:
  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • runtime/JSFunction.cpp:

(JSC::getCalculatedDisplayName):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::jsToWasmICCalleeStructure const):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::AirIRGenerator::addCallIndirect):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmContext.h:

(JSC::Wasm::Context::pointerToInstance):

  • wasm/WasmContextInlines.h:

(JSC::Wasm::Context::store):

  • wasm/WasmMemoryInformation.cpp:

(JSC::Wasm::getPinnedRegisters):
(JSC::Wasm::PinnedRegisterInfo::get):
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo):

  • wasm/WasmMemoryInformation.h:

(JSC::Wasm::PinnedRegisterInfo::toSave const):

  • wasm/WasmOMGPlan.cpp:

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

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/JSToWasmICCallee.cpp: Added.

(JSC::JSToWasmICCallee::create):
(JSC::JSToWasmICCallee::createStructure):
(JSC::JSToWasmICCallee::visitChildren):

  • wasm/js/JSToWasmICCallee.h: Added.

(JSC::JSToWasmICCallee::function):
(JSC::JSToWasmICCallee::JSToWasmICCallee):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::useTagRegisters const):
(JSC::WebAssemblyFunction::calleeSaves const):
(JSC::WebAssemblyFunction::usedCalleeSaveRegisters const):
(JSC::WebAssemblyFunction::previousInstanceOffset const):
(JSC::WebAssemblyFunction::previousInstance):
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::destroy):

  • wasm/js/WebAssemblyFunction.h:
  • wasm/js/WebAssemblyFunctionHeapCellType.cpp: Added.

(JSC::WebAssemblyFunctionDestroyFunc::operator() const):
(JSC::WebAssemblyFunctionHeapCellType::WebAssemblyFunctionHeapCellType):
(JSC::WebAssemblyFunctionHeapCellType::~WebAssemblyFunctionHeapCellType):
(JSC::WebAssemblyFunctionHeapCellType::finishSweep):
(JSC::WebAssemblyFunctionHeapCellType::destroy):

  • wasm/js/WebAssemblyFunctionHeapCellType.h: Added.
  • wasm/js/WebAssemblyPrototype.h:
11:53 AM Changeset in webkit [243885] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Pass CodeOrigin to FuzzerAgent
https://bugs.webkit.org/show_bug.cgi?id=196590

Reviewed by Saam Barati.

Pass CodeOrigin instead of bytecodeIndex. CodeOrigin includes richer information (InlineCallFrame*).
We also mask prediction with SpecBytecodeTop in DFGByteCodeParser. The fuzzer can produce any SpeculatedTypes,
but DFGByteCodeParser should only see predictions that can be actually produced from the bytecode execution.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):

  • runtime/FuzzerAgent.cpp:

(JSC::FuzzerAgent::getPrediction):

  • runtime/FuzzerAgent.h:
  • runtime/RandomizingFuzzerAgent.cpp:

(JSC::RandomizingFuzzerAgent::getPrediction):

  • runtime/RandomizingFuzzerAgent.h:
11:52 AM EarlyWarningSystem edited by aakash_jain@apple.com
(diff)
11:45 AM Changeset in webkit [243884] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix iOS build with recent SDKs.

std::ptr_fun() is deprecated.

  • platform/ios/LegacyTileGrid.mm:

(WebCore::LegacyTileGrid::dropDistantTiles):

11:40 AM EarlyWarningSystem created by aakash_jain@apple.com
11:00 AM WebKitGTK/2.24.x edited by Michael Catanzaro
Reviewed safari-607-branch commits through r243778 (diff)
10:55 AM Changeset in webkit [243883] by Manuel Rego Casasnovas
  • 2 edits in trunk/LayoutTests

[css-grid] Scroll reset position when updating inner html on content
https://bugs.webkit.org/show_bug.cgi?id=191506

Unreviewed gardening.

The problem described in this bug was fixed in r243687 (webkit.org/b/191506).
This test was still marked as Failure but it has been passing since then.

as it's passing now.

10:50 AM Changeset in webkit [243882] by Kocsen Chung
  • 3 edits in branches/safari-607-branch/Tools

Cherry-pick r243842. rdar://problem/34841155

run-webkit-tests: Upload test results (new results database)
https://bugs.webkit.org/show_bug.cgi?id=196577
<rdar://problem/34841155>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager.run): Upload results after each device shard, since the configuration will be different for each device. (Manager._results_to_upload_json_trie): Convert a TestRunResults object to a trie to be uploaded to a results database.
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): Add new 'Upload Options' and prepare 'Results JSON Options' for deprecation.

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

10:49 AM Changeset in webkit [243881] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

scrollingcoordinator/ios/ui-scroll-fixed.html is a flakky failure
https://bugs.webkit.org/show_bug.cgi?id=196612

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Changing expectations for flaky image failure
10:44 AM Changeset in webkit [243880] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Service Worker Process does not have the right domain name
https://bugs.webkit.org/show_bug.cgi?id=196585

Reviewed by Chris Dumez.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
Updated extraInitializationData to go from "security-origin" to "registrable-domain".

10:39 AM Changeset in webkit [243879] by pvollan@apple.com
  • 1 edit
    1 add in trunk/Tools

[Win] DumpRenderTreeWatchDog.py is not checked into source
https://bugs.webkit.org/show_bug.cgi?id=196567
<rdar://problem/49525901>

Reviewed by Lucas Forschler.

This script is used on Win EWS bots to terminate hanging DRT processes.

  • EWSTools/dumprendertreewatchdog.py: Added.
10:39 AM Changeset in webkit [243878] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[macOS WK1] Layout Test webanimations/accelerated-transition-interrupted-on-composited-element.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=189678
<rdar://problem/44621674>

Patch by Antoine Quint <Antoine Quint> on 2019-04-04
Reviewed by Dean Jackson.

We make the test sturdier by waiting for two rAFs instead of just one to wait until animations have been updated (one rAF)
and accelerated animations have been committed (two rAFs).

We also use the "transitioncancel" event to determine the transition has been interrupted rather than using a rAF callback.

  • webanimations/accelerated-transition-interrupted-on-composited-element.html:
10:36 AM Changeset in webkit [243877] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Temporarily disable delayed WebProcess launch on iOS to address PLT regression
https://bugs.webkit.org/show_bug.cgi?id=196604
<rdar://problem/49074131>

Reviewed by Geoffrey Garen.

Temporarily disable delayed WebProcess launch on iOS to address PLT regression. This
is while I figure out how to enable this on iOS without regressed PLT.

  • UIProcess/WebProcessPool.h:
10:36 AM Changeset in webkit [243876] by Ryan Haddad
  • 2 edits in branches/safari-607-branch/LayoutTests

Cherry-pick r243768. rdar://problem/49539493

[Mojave] Layout test fast/text/complex-initial-advance.html is failing
https://bugs.webkit.org/show_bug.cgi?id=196512

Unreviewed test gardening.

  • platform/mac/TestExpectations: Mark test as failing.

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

10:21 AM Changeset in webkit [243875] by Caio Lima
  • 10 edits
    1 add in trunk

[JSC] We should consider moving UnlinkedFunctionExecutable::m_parentScopeTDZVariables to RareData
https://bugs.webkit.org/show_bug.cgi?id=194944

Reviewed by Keith Miller.

JSTests:

  • stress/verify-bytecode-generator-cached-variables-under-tdz.js: Added.

Source/JavaScriptCore:

Based on profile data collected on JetStream2, Speedometer 2 and
other benchmarks, it is very rare having non-empty
UnlinkedFunctionExecutable::m_parentScopeTDZVariables.

  • Data collected from Speedometer2

Total number of UnlinkedFunctionExecutable: 39463
Total number of non-empty parentScopeTDZVars: 428 (~1%)

  • Data collected from JetStream2

Total number of UnlinkedFunctionExecutable: 83715
Total number of non-empty parentScopeTDZVars: 5285 (~6%)

We also collected numbers on 6 of top 10 Alexia sites.

  • Data collected from youtube.com

Total number of UnlinkedFunctionExecutable: 29599
Total number of non-empty parentScopeTDZVars: 97 (~0.3%)

  • Data collected from twitter.com

Total number of UnlinkedFunctionExecutable: 23774
Total number of non-empty parentScopeTDZVars: 172 (~0.7%)

  • Data collected from google.com

Total number of UnlinkedFunctionExecutable: 33209
Total number of non-empty parentScopeTDZVars: 174 (~0.5%)

  • Data collected from amazon.com:

Total number of UnlinkedFunctionExecutable: 15182
Total number of non-empty parentScopeTDZVars: 166 (~1%)

  • Data collected from facebook.com:

Total number of UnlinkedFunctionExecutable: 54443
Total number of non-empty parentScopeTDZVars: 269 (~0.4%)

  • Data collected from netflix.com:

Total number of UnlinkedFunctionExecutable: 39266
Total number of non-empty parentScopeTDZVars: 97 (~0.2%)

Considering such numbers, this patch is moving m_parentScopeTDZVariables
to RareData. This decreases sizeof(UnlinkedFunctionExecutable) by
16 bytes. With this change, now UnlinkedFunctionExecutable constructors
receives an Optional<VariableEnvironmentMap::Handle> and only stores
it when value != WTF::nullopt. We also changed
UnlinkedFunctionExecutable::parentScopeTDZVariables() and it returns
VariableEnvironment() whenever the Executable doesn't have RareData,
or VariableEnvironmentMap::Handle is unitialized. This is required
because RareData is instantiated when any of its field is stored and
we can have an unitialized Handle even on cases when parentScopeTDZVariables
is WTF::nullopt.

Results on memory usage on JetStrem2 is neutral.

Mean of memory peak on ToT: 4258633728 bytes (confidence interval: 249720072.95)
Mean of memory peak on Changes: 4367325184 bytes (confidence interval: 321285583.61)

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createExecutable):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):

  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::getVariablesUnderTDZ):

BytecodeGenerator::getVariablesUnderTDZ now also caches if m_cachedVariablesUnderTDZ
is empty, so we can properly return WTF::nullopt without the
reconstruction of a VariableEnvironment to check if it is empty.

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::makeFunction):

  • parser/VariableEnvironment.h:

(JSC::VariableEnvironment::isEmpty const):

  • runtime/CachedTypes.cpp:

(JSC::CachedCompactVariableMapHandle::decode const):

It returns an unitialized Handle when there is no
CompactVariableEnvironment. This can happen when RareData is ensured
because of another field.

(JSC::CachedFunctionExecutableRareData::encode):
(JSC::CachedFunctionExecutableRareData::decode const):
(JSC::CachedFunctionExecutable::encode):
(JSC::CachedFunctionExecutable::decode const):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):

  • runtime/CodeCache.cpp:

Instead of creating a dummyVariablesUnderTDZ, we simply pass
WTF::nullopt.

(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

10:16 AM Changeset in webkit [243874] by Ryan Haddad
  • 3 edits in branches/safari-607-branch/LayoutTests

Cherry-pick r241307. rdar://problem/49610758

AX: Fix flaky accessibility/loading-iframe-sends-notification.html
https://bugs.webkit.org/show_bug.cgi?id=194546

Reviewed by Zalan Bujtas.

This test was relying on timing between load events being sent and accessibility events being sent.
We don't need to do that, we can more directly test this interplay.

  • accessibility/loading-iframe-sends-notification-expected.txt:
  • accessibility/loading-iframe-sends-notification.html:

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

10:08 AM WebKitGTK/2.24.x edited by Michael Catanzaro
Propose merges (diff)
9:52 AM Changeset in webkit [243873] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Log the error if VideoProcessing library cannot be dlopen
https://bugs.webkit.org/show_bug.cgi?id=196609

Reviewed by Eric Carlson.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp:

(webrtc::initVideoProcessingVPModuleInitialize):

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

[WPE] Unreviewed gardening

Remove tests that are expected to fail but pass.

  • platform/wpe/TestExpectations:
9:38 AM Changeset in webkit [243871] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION (r236501?): Layout Test compositing/geometry/limit-layer-bounds-opacity-transition.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=190210
<rdar://problem/45045989>

Unreviewed.

The flakiness dashboard shows that this test hasn't been flaky for a few weeks, reverting the flaky expectation.

Patch by Antoine Quint <Antoine Quint> on 2019-04-04

  • platform/mac/TestExpectations:
8:44 AM Changeset in webkit [243870] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, roll out r243858 which made tests time out.

Disable new API tests on Windows instead.

  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:

(TestWebKitAPI::TEST):

8:41 AM Changeset in webkit [243869] by Tadeu Zagallo
  • 4 edits
    2 adds in trunk

Cache bytecode for jsc.cpp helpers and fix CachedStringImpl
https://bugs.webkit.org/show_bug.cgi?id=196409

Reviewed by Saam Barati.

JSTests:

  • stress/bytecode-cache-cached-string-impl.js: Added.

(f):
(g):

  • stress/bytecode-cache-run-string.js: Added.

Source/JavaScriptCore:

Some of the helpers in jsc.cpp, such as functionRunString, were stll using
using makeSource instead of jscSource, which does not use the ShellSourceProvider
and therefore does not write the bytecode cache to disk.

Changing that revealed a bug in bytecode cache. The Encoder keeps a mapping
of pointers to offsets of already cached objects, in order to avoid caching
the same object twice. Similarly, the Decoder keeps a mapping from offsets
to pointers, in order to avoid creating multiple objects in memory for the
same cached object. The following was happening:
1) A StringImpl* S was cached as CachedPtr<CachedStringImpl> at offset O. We add
an entry in the Encoder mapping that S has already been encoded at O.
2) We cache StringImpl* S again, but now as CachedPtr<CachedUniquedStringImpl>.
We find an entry in the Encoder mapping for S, and return the offset O. However,
the object cached at O is a CachedPtr<CachedStringImpl> (i.e. not Uniqued).

3) When decoding, there are 2 possibilities:
3.1) We find S for the first time through a CachedPtr<CachedStringImpl>. In
this case, everything works as expected since we add an entry in the decoder
mapping from the offset O to the decoded StringImpl* S. The next time we find
S through the uniqued version, we'll return the already decoded S.
3.2) We find S through a CachedPtr<CachedUniquedStringImpl>. Now we have a
problem, since the CachedPtr has the offset of a CachedStringImpl (not uniqued),
which has a different shape and we crash.

We fix this by making CachedStringImpl and CachedUniquedStringImpl share the
same implementation. Since it doesn't matter whether a string is uniqued for
encoding, and we always decode strings as uniqued either way, they can be used
interchangeably.

  • jsc.cpp:

(functionRunString):
(functionLoadString):
(functionDollarAgentStart):
(functionCheckModuleSyntax):
(runInteractive):

  • runtime/CachedTypes.cpp:

(JSC::CachedUniquedStringImplBase::decode const):
(JSC::CachedFunctionExecutable::rareData const):
(JSC::CachedCodeBlock::rareData const):
(JSC::CachedFunctionExecutable::encode):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedUniquedStringImpl::encode): Deleted.
(JSC::CachedUniquedStringImpl::decode const): Deleted.
(JSC::CachedStringImpl::encode): Deleted.
(JSC::CachedStringImpl::decode const): Deleted.

7:16 AM Changeset in webkit [243868] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

[Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
https://bugs.webkit.org/show_bug.cgi?id=196118
<rdar://problem/46614137>

Patch by Antoine Quint <Antoine Quint> on 2019-04-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: webanimations/js-wrapper-kept-alive.html

We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::stop): Drive-by fix for the missing superclass method call.
(WebCore::WebAnimation::hasPendingActivity const):

  • animation/WebAnimation.h:

LayoutTests:

Add a test that starts a short animation, sets a custom property on it, registers a "finish" event listener on it and deletes
the sole reference to it in the JS world before triggering garbage collection. Prior to this fix, this test would time out
because the JS wrapper would be garbage-collected prior to the animation completing and thus the event listener would not
be called. To complete successfully, this test checks that it receives the event and its target is the same animation object
that was originally created by checking the custom property is still set.

  • legacy-animation-engine/animations/resume-after-page-cache.html:
  • webanimations/js-wrapper-kept-alive-expected.txt: Added.
  • webanimations/js-wrapper-kept-alive.html: Added.
7:15 AM Changeset in webkit [243867] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

UnlinkedCodeBlock constructor from cache should initialize m_didOptimize
https://bugs.webkit.org/show_bug.cgi?id=196396

Reviewed by Saam Barati.

The UnlinkedCodeBlock constructor in CachedTypes was missing the initialization
for m_didOptimize, which leads to crashes in CodeBlock::thresholdForJIT.

  • runtime/CachedTypes.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

5:51 AM Changeset in webkit [243866] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

[GTK][WPE] Use a timer to request the creation of pending tiles
https://bugs.webkit.org/show_bug.cgi?id=196594

Reviewed by Žan Doberšek.

Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
while inside a layer flush.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1:53 AM Changeset in webkit [243865] by magomez@igalia.com
  • 6 edits in trunk/Source/WebKit

[CoordGraphics] Revalidate need for 'coordinated update completion' in ThreadedCompositor
https://bugs.webkit.org/show_bug.cgi?id=188839

Reviewed by Žan Doberšek.

Even if a platform layer has changed, don't wait for a main thread callback to finish the
CompositingRunLoop update. It can be finished as soon as we receive the frameComplete signal.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::scheduleUpdate):
(WebKit::CompositingRunLoop::stopUpdates):
(WebKit::CompositingRunLoop::updateCompleted):
(WebKit::CompositingRunLoop::updateTimerFired):
(WebKit::CompositingRunLoop::compositionCompleted): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::renderLayerTree):
(WebKit::ThreadedCompositor::sceneUpdateFinished):
(WebKit::ThreadedCompositor::displayRefreshMonitor):
(WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::handleDisplayRefreshMonitorUpdate):

Apr 3, 2019:

10:53 PM Changeset in webkit [243864] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[ATK] Wrong index passed to AtkObject::children-changed::add signal in AXObjectCache::attachWrapper()
https://bugs.webkit.org/show_bug.cgi?id=196538

Reviewed by Michael Catanzaro.

In most of the cases the parent is not found, probably because the child is not a direct descendant of the
parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound.

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound.

10:52 PM Changeset in webkit [243863] by Carlos Garcia Campos
  • 6 edits
    1 move
    1 add
    1 delete in trunk

[ATK] Cleanup WebPageAccessibilityObjectAtk
https://bugs.webkit.org/show_bug.cgi?id=196537

Reviewed by Michael Catanzaro.

Source/WebKit:

Several changes and cleanups:

  • Add WebKit prefix so that style checker doesn't complain about GObject conventions.
  • Rename the header to remove the Atk prefix to match the cpp file and class name.
  • Use pragma once.
  • Use nullptr instead of 0.
  • Use WEBKIT_DEFINE_TYPE instead of G_DEFINE_TYPE.
  • Return generic AtkObject* from constructor.
  • SourcesGTK.txt:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp: Renamed from Source/WebKit/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp.

(accessibilityRootObjectWrapper):
(webkitWebPageAccessibilityObjectInitialize):
(webkitWebPageAccessibilityObjectGetIndexInParent):
(webkitWebPageAccessibilityObjectGetNChildren):
(webkitWebPageAccessibilityObjectRefChild):
(webkit_web_page_accessibility_object_class_init):
(webkitWebPageAccessibilityObjectNew):
(webkitWebPageAccessibilityObjectRefresh):

  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Added.
  • WebProcess/WebPage/atk/WebPageAccessibilityObject.h: Removed.
  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::updateAccessibilityTree):

Tools:

Also consider files under atk directories as exceptions for GObject conventions.

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

(check_identifier_name_in_declaration):

10:51 PM Changeset in webkit [243862] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[ATK] Set ATK_STATE_TRANSIENT on the atk socket until it's embedded
https://bugs.webkit.org/show_bug.cgi?id=196535

Reviewed by Michael Catanzaro.

This way the properties are not cached. Right now, if number of children is queried before the socket is
embedded, 0 is returned and cached, so ATs don't see the child even after the socket has been embedded.

  • UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp:

(webkitWebViewBaseAccessibleRefStateSet): Set ATK_STATE_TRANSIENT is the socket is not occupied.

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree): Unset ATK_STATE_TRANSIENT.

10:50 PM Changeset in webkit [243861] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit

[ATK] Embed the AtkSocket as soon as we receive the plug ID
https://bugs.webkit.org/show_bug.cgi?id=196534

Reviewed by Michael Catanzaro.

We are currently storing the ID and waiting for the next time get_accessible is called to embed the socket. We
can simply embed the socket when the plug ID is received.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseGetAccessible):

  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree):

10:48 PM Changeset in webkit [243860] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[ATK] Don't touch accessibility tree in WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld
https://bugs.webkit.org/show_bug.cgi?id=193914

Reviewed by Michael Catanzaro.

Move it to dispatchDidFinishDocumentLoad, since we know we have the document at that point and we can create the
root accessibility object wrapper.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):

10:47 PM Changeset in webkit [243859] by timothy@apple.com
  • 6 edits in trunk

Update AutoFill field icons to be SVG instead of PNG images.
https://bugs.webkit.org/show_bug.cgi?id=196557
rdar://problem/48292514

Reviewed by Tim Horton.

Source/WebCore:

  • css/html.css:

(input::-webkit-credentials-auto-fill-button):
(input::-webkit-contacts-auto-fill-button):
(input::-webkit-credit-card-auto-fill-button):

LayoutTests:

  • platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt:
  • platform/mac/fast/forms/auto-fill-button/input-contacts-auto-fill-button-expected.txt:
  • platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt:
10:44 PM Changeset in webkit [243858] by Fujii Hironori
  • 2 edits in trunk/Tools

The page's focusedFrame / frameSetLargestFrame do not get cleared on process swap or crash
https://bugs.webkit.org/show_bug.cgi?id=196588
<rdar://problem/49365787>

Unreviewed build fix for Windows port.

error C3861: 'kill': identifier not found

  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:

(TestWebKitAPI::TEST): Replaced kill with WKPageTerminate.

10:27 PM Changeset in webkit [243857] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling in r243843 with the build fix
https://bugs.webkit.org/show_bug.cgi?id=196586

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/RandomizingFuzzerAgent.cpp:

(JSC::RandomizingFuzzerAgent::getPrediction):

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

Added a tag for Safari Technology Preview release 79.

8:57 PM Changeset in webkit [243855] by Simon Fraser
  • 9 edits in trunk/Source

Simplify some "programmaticScroll" code paths
https://bugs.webkit.org/show_bug.cgi?id=196589

Reviewed by Zalan Bujtas.

Source/WebCore:

AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() just returned early if programmaticScroll
was true, so instead, just never call it. This means we can remove the "programmaticScroll" argument from
scheduleUpdateScrollPositionAfterAsyncScroll(). Also change some callers to use the ScrollType enum
instead of a bool.

Now, ThreadedScrollingTree::scrollingTreeNodeDidScroll() just returns early. Programmatic scrolls
update state on the main thread before updating the scrolling tree, so this makes sense.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):

  • page/scrolling/AsyncScrollingCoordinator.h:

(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType const):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::operator<<):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::reconcileScrollingState):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

Source/WebKit:

  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm: Remove the parameter.

(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode): Use the enum type.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

8:57 PM Changeset in webkit [243854] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Cancel build and similar operations should have authentication
https://bugs.webkit.org/show_bug.cgi?id=196520

Reviewed by Dewei Zhu.

  • BuildSlaveSupport/ews-build/master.cfg: Configure authentication using admin's username and password from

environment variables.

8:44 PM Changeset in webkit [243853] by Ryan Haddad
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r243843.

Broke CLoop and Windows builds.

Reverted changeset:

"[JSC] Add dump feature for RandomizingFuzzerAgent"
https://bugs.webkit.org/show_bug.cgi?id=196586
https://trac.webkit.org/changeset/243843

8:38 PM Changeset in webkit [243852] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Do not trigger queues which are not in production yet
https://bugs.webkit.org/show_bug.cgi?id=196581

Reviewed by Dewei Zhu.

  • BuildSlaveSupport/ews-build/config.json:
8:37 PM Changeset in webkit [243851] by rmorisset@apple.com
  • 10 edits
    2 copies
    5 adds in trunk

B3 should use associativity to optimize expression trees
https://bugs.webkit.org/show_bug.cgi?id=194081

Reviewed by Filip Pizlo.

JSTests:

Added three microbenchmarks:

  • add-tree should be the ideal case, but there is no speedup because we are currently unable to prove that the CheckAdd won't overflow
  • bit-xor-tree most closely matches the situation where the optimization triggers on the JetStream2 subtests where it triggers: an unbalanced expression tree of size 8 that can be balanced, with no other optimizations being unlocked. 16% speedup
  • bit-or-tree is an ideal case, where the reassociation also enables a ton of further simplifications. 42% speedup
  • microbenchmarks/add-tree.js: Added.
  • microbenchmarks/bit-or-tree.js: Added.
  • microbenchmarks/bit-xor-tree.js: Added.

Source/JavaScriptCore:

This patch adds a new B3 pass, that tries to find and optimize expression trees made purely of any one associative and commutative operator (Add/Mul/BitOr/BitAnd/BitXor).
The pass only runs in O2, and runs once, after lowerMacros and just before a run of B3ReduceStrength (which helps clean up the dead code it tends to leave behind).
I had to separate killDeadCode out of B3ReduceStrength (as a new B3EliminateDeadCode pass) to run it before B3OptimizeAssociativeExpressionTrees, as otherwise it is stopped by high use counts
inherited from CSE.
This extra run of DCE is by itself a win, most notably on microbenchmarks/instanceof-always-hit-two (1.5x faster), and on microbenchmarks/licm-dragons(-out-of-bounds) (both get 1.16x speedup).
I suspect it is because it runs between CSE and tail-dedup, and as a result allows a lot more tail-dedup to occur.

The pass is currently extremely conservative, not trying anything if it would cause _any_ code duplication.
For this purpose, it starts by computing use counts for the potentially interesting nodes (those with the right opcodes), and segregate them into expression trees.
The root of an expression tree is a node that is either used in multiple places, or is used by a value with a different opcode.
The leaves of an expression tree are nodes that are either used in multiple places, or have a different opcode.
All constant leaves of a tree are combined, as well as all leaves that are identical. What remains is then laid out into a balanced binary tree, hopefully maximizing ILP.

This optimization was implemented as a stand-alone pass and not as part of B3ReduceStrength mostly because it needs use counts to avoid code duplication.
It also benefits from finding all tree roots first, and not trying to repeatedly optimize subtrees.

I added several tests to testB3 with varying patterns of trees. It is also tested in a less focused way by lots of older tests.

In the future this pass could be expanded to allow some bounded amount of code duplication, and merging more leaves (e.g. Mul(a, 3) and a in an Add tree, into Mul(a, 4))
The latter will need exposing the peephole optimizations out of B3ReduceStrength to avoid duplicating code.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/B3Common.cpp:

(JSC::B3::shouldDumpIR):
(JSC::B3::shouldDumpIRAtEachPhase):

  • b3/B3Common.h:
  • b3/B3EliminateDeadCode.cpp: Added.

(JSC::B3::EliminateDeadCode::run):
(JSC::B3::eliminateDeadCode):

  • b3/B3EliminateDeadCode.h: Added.

(JSC::B3::EliminateDeadCode::EliminateDeadCode):

  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3OptimizeAssociativeExpressionTrees.cpp: Added.

(JSC::B3::OptimizeAssociativeExpressionTrees::OptimizeAssociativeExpressionTrees):
(JSC::B3::OptimizeAssociativeExpressionTrees::neutralElement):
(JSC::B3::OptimizeAssociativeExpressionTrees::isAbsorbingElement):
(JSC::B3::OptimizeAssociativeExpressionTrees::combineConstants):
(JSC::B3::OptimizeAssociativeExpressionTrees::emitValue):
(JSC::B3::OptimizeAssociativeExpressionTrees::optimizeRootedTree):
(JSC::B3::OptimizeAssociativeExpressionTrees::run):
(JSC::B3::optimizeAssociativeExpressionTrees):

  • b3/B3OptimizeAssociativeExpressionTrees.h: Added.
  • b3/B3ReduceStrength.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::replaceWithIdentity):

  • b3/testb3.cpp:

(JSC::B3::testBitXorTreeArgs):
(JSC::B3::testBitXorTreeArgsEven):
(JSC::B3::testBitXorTreeArgImm):
(JSC::B3::testAddTreeArg32):
(JSC::B3::testMulTreeArg32):
(JSC::B3::testBitAndTreeArg32):
(JSC::B3::testBitOrTreeArg32):
(JSC::B3::run):

8:34 PM Changeset in webkit [243850] by youenn@apple.com
  • 4 edits in trunk/Source

Add logging and ASSERTs to investigate issue with VPModuleInitialize
https://bugs.webkit.org/show_bug.cgi?id=196573

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Expand macros directly to add some logging.
Removed the dispatch_once since VPModuleInitialize is already called in one.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp:

(webrtc::initVideoProcessingVPModuleInitialize):

Source/WebCore:

Add some ASSERTs.
No change of behavior.

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):

8:23 PM Changeset in webkit [243849] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, fix typo in the name of API test added in r243848.

  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:

(TestWebKitAPI::TEST):

8:09 PM Changeset in webkit [243848] by Chris Dumez
  • 4 edits in trunk

The page's focusedFrame / frameSetLargestFrame do not get cleared on process swap or crash
https://bugs.webkit.org/show_bug.cgi?id=196588
<rdar://problem/49365787>

Reviewed by Ryosuke Niwa.

Source/WebKit:

The page's focusedFrame / frameSetLargestFrame do not get cleared on process swap or crash.
This can lead to returning stale frames to the client if it asks for those.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:

(TestWebKitAPI::nullJavaScriptCallback):
(TestWebKitAPI::didCrashCheckFrames):
(TestWebKitAPI::TEST):

7:53 PM Changeset in webkit [243847] by Simon Fraser
  • 15 edits in trunk/Source/WebKit

Remove the isProgrammaticScroll argument to requestScroll() because no-one uses it
https://bugs.webkit.org/show_bug.cgi?id=196587

Reviewed by Zalan Bujtas.

This argument was unused.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestScroll):

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

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/win/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/win/PageClientImpl.h:
7:52 PM Changeset in webkit [243846] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Remove some redundant memebers from ScrollingStateFrameScrollingNode
https://bugs.webkit.org/show_bug.cgi?id=196571

Reviewed by Zalan Bujtas.

m_requestedScrollPosition and m_requestedScrollPositionRepresentsProgrammaticScroll were
duplicated on ScrollingStateFrameScrollingNode and ScrollingStateScrollingNode, so
remove them from the derived class.

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
7:09 PM Changeset in webkit [243845] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r220717): Assertion fires when animating an SVG rounded corner rect till it collapses
https://bugs.webkit.org/show_bug.cgi?id=196518

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-04-03
Reviewed by Simon Fraser.

Source/WebCore:

r220717 made RenderSVGRect clear its m_path in updateShapeFromElement().

RenderSVGRect tries to optimize its layout and drawing if the rectangle
is not rounded. So it uses the flag m_usePathFallback to know whether to
use m_path or m_innerStrokeRect and m_outerStrokeRect. If the rectangle
is rounded but its boundingSize is empty, m_path will be cleared,
m_innerStrokeRect and m_outerStrokeRect will be recalculated but
m_usePathFallback will not be reset to false. Therefore when calling
RenderSVGRect::isEmpty(), it will call RenderSVGShape::isEmpty() which
will assert since m_path is null.

Test: svg/animations/animate-rounded-corner-rect-zero-height.svg

  • rendering/svg/RenderSVGRect.cpp:

(WebCore::RenderSVGRect::updateShapeFromElement):
Reset m_usePathFallback to false once clearPath() is called.

LayoutTests:

  • svg/animations/animate-rounded-corner-rect-zero-height-expected.txt: Added.
  • svg/animations/animate-rounded-corner-rect-zero-height.svg: Added.
7:01 PM Changeset in webkit [243844] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Nullptr crash in InlineTextBox::selectionState via TextIndicator::createWithRange
https://bugs.webkit.org/show_bug.cgi?id=196579

Reviewed by Simon Fraser.

Avoid crashing accessing the unengated optional's value in relese builds for now.

Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject
getting out out of sync would require a significant re-architecturing of the whole selection
repainting / state managing mechanism.

  • rendering/SelectionRangeData.h:

(WebCore::SelectionRangeData::startPosition const):
(WebCore::SelectionRangeData::endPosition const):

6:28 PM Changeset in webkit [243843] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Add dump feature for RandomizingFuzzerAgent
https://bugs.webkit.org/show_bug.cgi?id=196586

Reviewed by Saam Barati.

Towards deterministic tests for the results from randomizing fuzzer agent, this patch adds Options::dumpRandomizingFuzzerAgentPredictions, which dumps the generated types.
The results is like this.

getPrediction name:(#C2q9xD),bytecodeIndex:(22),original:(Array),generated:(OtherObj|Array|Float64Array|BigInt|NonIntAsDouble)
getPrediction name:(makeUnwriteableUnconfigurableObject#AiEJv1),bytecodeIndex:(14),original:(OtherObj),generated:(Final|Uint8Array|Float64Array|SetObject|WeakSetObject|BigInt|NonIntAsDouble)

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/RandomizingFuzzerAgent.cpp:

(JSC::RandomizingFuzzerAgent::getPrediction):

5:43 PM Changeset in webkit [243842] by Jonathan Bedard
  • 3 edits in trunk/Tools

run-webkit-tests: Upload test results (new results database)
https://bugs.webkit.org/show_bug.cgi?id=196577
<rdar://problem/34841155>

Reviewed by Lucas Forschler.

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

(Manager.run): Upload results after each device shard, since the configuration will be
different for each device.
(Manager._results_to_upload_json_trie): Convert a TestRunResults object to a trie to be
uploaded to a results database.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args): Add new 'Upload Options' and prepare 'Results JSON Options' for deprecation.

5:16 PM Changeset in webkit [243841] by mmaxfield@apple.com
  • 24 edits
    2 adds in trunk

-apple-trailing-word is needed for browser detection
https://bugs.webkit.org/show_bug.cgi?id=196575

Unreviewed.

PerformanceTests:

  • MotionMark/resources/debug-runner/motionmark.css:

(#intro .start-benchmark p):

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

This is an unreviewed partial revert of r243819. Turns out there are some websites
which use this property to do browser detection. So, we need to continue to parse
the property, but we don't need the property to do anything.

Test: fast/text/trailing-word-detection.html

  • Configurations/FeatureDefines.xcconfig:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TrailingWord const):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::trailingWord const):
(WebCore::RenderStyle::setTrailingWord):
(WebCore::RenderStyle::initialTrailingWord):

  • rendering/style/RenderStyleConstants.h:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • fast/text/trailing-word-detection-expected.txt: Added.
  • fast/text/trailing-word-detection.html: Added.
  • platform/gtk/TestExpectations:
  • platform/win/TestExpectations:
4:57 PM Changeset in webkit [243840] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html is a flaky failure and timeout
https://bugs.webkit.org/show_bug.cgi?id=196115

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations for flaky test
4:51 PM Changeset in webkit [243839] by msaboff@apple.com
  • 5 edits in trunk

REGRESSION (r243642): com.apple.JavaScriptCore crash in JSC::RegExpObject::execInline
https://bugs.webkit.org/show_bug.cgi?id=196477

Reviewed by Keith Miller.

Source/JavaScriptCore:

The problem here is that when we advance the index by 2 for a character class that only
has non-BMP characters, we might go past the end of the string. This can happen for
greedy counted character classes that are part of a alternative where there is one
character to match after the greedy non-BMP character class.

The "do we have string left to match" check at the top of the JIT loop for the counted
character class checks to see if index is not equal to the string length. For non-BMP
character classes, we need to check to see if there are at least 2 characters left.
Therefore we now temporarily add 1 to the current index before comparing. This checks
to see if there are iat least 2 characters left to match, instead of 1.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

LayoutTests:

Updated the test with a couple more test cases to test a few variants of this bug.
Also added a couple of non-greedy counted non-BMP character class tests that don't have
the bug just to be sure.

  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:
4:39 PM Changeset in webkit [243838] by youenn@apple.com
  • 2 deletes in trunk/Source/ThirdParty/libwebrtc/Source/third_party

Remove unneeded libwebrtc files, this time all the files
https://bugs.webkit.org/show_bug.cgi?id=196553

Reviewed by Eric Carlson.

  • Source/third_party/boringssl/src/fuzz: Removed.
  • Source/third_party/protobuf/csharp/keys: Removed.
4:35 PM Changeset in webkit [243837] by youenn@apple.com
  • 1 edit in trunk/Source/ThirdParty/libwebrtc/ChangeLog

Remove unneeded libwebrtc files
https://bugs.webkit.org/show_bug.cgi?id=196553

Reviewed by Eric Carlson.

  • Source/third_party/boringssl/src/fuzz: Removed.
  • Source/third_party/protobuf/csharp/keys: Removed.
4:30 PM Changeset in webkit [243836] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Add a WebKit internal feature flag to always enable modern compatibility mode by default
https://bugs.webkit.org/show_bug.cgi?id=196526
<rdar://problem/49532923>

Reviewed by Tim Horton.

Change UseModernCompatibilityModeByDefault from an internal preference to a debug preference, so that it may be
enabled for all apps on the system.

  • Shared/WebPreferences.yaml:
4:29 PM Changeset in webkit [243835] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Exception verification crash on operationArrayIndexOfValueInt32OrContiguous
https://bugs.webkit.org/show_bug.cgi?id=196574

Reviewed by Saam Barati.

JSTests:

  • stress/string-index-of-exception-check.js: Added.

(blurType):
(1.forEach):

Source/JavaScriptCore:

This patch adds missing exception check in operationArrayIndexOfValueInt32OrContiguous.

  • dfg/DFGOperations.cpp:
4:21 PM Changeset in webkit [243834] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix internal build after r243829
https://bugs.webkit.org/show_bug.cgi?id=196549

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
Some SDK's don't include this selector in the header.
Use NSSelectorFromString.

4:08 PM Changeset in webkit [243833] by don.olmstead@sony.com
  • 28 edits
    2 adds in trunk

[CMake][WTF] Mirror XCode header directories
https://bugs.webkit.org/show_bug.cgi?id=191662

Reviewed by Konstantin Tokarev.

.:

Add WTF_FRAMEWORK_HEADERS_DIR to place WTF headers into. Add frameworks/WTF.cmake
which creates an interface target which will populate dependencies for consumers.
This file is added here to support AppleWin internal builds which invoke CMake on
each directory.

  • Source/cmake/WebKitFS.cmake:
  • Source/cmake/frameworks/WTF.cmake: Added.

Source/JavaScriptCore:

Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
builds.

  • CMakeLists.txt:
  • shell/CMakeLists.txt:

Source/WebCore:

Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
builds.

  • CMakeLists.txt:
  • PlatformWin.cmake:

Source/WebDriver:

Use WTFFramework as a dependency.

  • CMakeLists.txt:

Source/WebKit:

Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
builds.

  • CMakeLists.txt:

Source/WebKitLegacy:

Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
builds.

  • CMakeLists.txt:
  • PlatformWin.cmake:

Source/WebKitLegacy/win:

  • WebKitQuartzCoreAdditions/CMakeLists.txt:

Source/WTF:

Rename WTF forwarding header target to WTFFramework and update the install location
to WTF_FRAMEWORK_HEADERS_DIR.

  • wtf/CMakeLists.txt:

Tools:

Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
builds.

  • CMakeLists.txt:
  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformWin.cmake:
  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformWin.cmake:
3:24 PM Changeset in webkit [243832] by ysuzuki@apple.com
  • 11 edits
    4 adds in trunk/Source/JavaScriptCore

[JSC] Add FuzzerAgent, which has a hooks to get feedback & inject fuzz data into JSC
https://bugs.webkit.org/show_bug.cgi?id=196530

Reviewed by Saam Barati.

This patch adds FuzzerAgent interface and simple RandomizingFuzzerAgent to JSC.
This RandomizingFuzzerAgent returns random SpeculatedType for value profiling to find
the issues in JSC. The seed for randomization can be specified by seedOfRandomizingFuzzerAgent.

I ran this with seedOfRandomizingFuzzerAgent=1 last night and it finds 3 failures in the current JSC tests,
they should be fixed in subsequent patches.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):

  • runtime/FuzzerAgent.cpp: Added.

(JSC::FuzzerAgent::~FuzzerAgent):
(JSC::FuzzerAgent::getPrediction):

  • runtime/FuzzerAgent.h: Added.
  • runtime/JSGlobalObjectFunctions.cpp:
  • runtime/Options.h:
  • runtime/RandomizingFuzzerAgent.cpp: Added.

(JSC::RandomizingFuzzerAgent::RandomizingFuzzerAgent):
(JSC::RandomizingFuzzerAgent::getPrediction):

  • runtime/RandomizingFuzzerAgent.h: Added.
  • runtime/RegExpCachedResult.h:
  • runtime/RegExpGlobalData.cpp:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

(JSC::VM::fuzzerAgent const):
(JSC::VM::setFuzzerAgent):

3:16 PM Changeset in webkit [243831] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore/PAL

Avoid the use of WTF_EXTERN_C_BEGIN in NSMenuSPI.h
https://bugs.webkit.org/show_bug.cgi?id=196566

Reviewed by Timothy Hatcher.

  • pal/spi/mac/NSMenuSPI.h:
3:07 PM Changeset in webkit [243830] by commit-queue@webkit.org
  • 97 edits
    19 deletes in trunk/Source/WebCore

Remove SVG properties tear-off objects
https://bugs.webkit.org/show_bug.cgi?id=191237

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-04-03
Reviewed by Simon Fraser.

This patch cleans the code from unused SVG sources and get rid off the
remaining SVG properties tear-off objects. Here are more details:

-- Remove the SVGAttributeAnimationController and move its code to the

SVGAnimateElementBase. SVGAttributeAnimationController was introduced
to allow animating the SVG properties whether they are backed by tear
off objects or not. Since there will be no tear off objects anymore,
one animation controller will be needed. But in this case, it will be
better if we make SVGAnimateElementBase is the animation controller
and make it manage the animator directly.

-- Remove SVGAttributeRegistry, SVGAttributeOwnerProxy and the virtual

function SVGElement::attributeOwnerProxy(). Remove also all the
overriding functions attributeOwnerProxy() from all the SVGElements.

-- Remove isKnownAttribute() from all the SVG header files except from

four classes: SVGURIReference, SVGFitToViewBox, SVGLangSpace
and SVGExternalResourcesRequired.

-- Remove all the SVG animated properties classifying functions from

SVGElement. This is now handled by SVGPropertyRegistry.

-- There is no need for the enum AnimatedPropertyType anymore. The SVG

property accessor knows its type, knows how to access it and know what
animator it should be created for it.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Element.cpp:

(WebCore::Element::synchronizeAllAttributes const):
(WebCore::Element::synchronizeAttribute const):
(WebCore::Element::fastAttributeLookupAllowed const):
These functions are surprisingly marked 'const'. They were calling 'const'
functions in SVGElement and SVGElement was casting 'this' as non 'const'
before calling the non 'const' functions through the non 'const' 'this'
pointer. Change this by moving the casting to the Element functions.

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::RenderSVGResourceGradient::applyResource):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::applyResource):

  • svg/SVGAElement.h:
  • svg/SVGAltGlyphElement.h:
  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
(WebCore::SVGAnimateElementBase::animator const):
(WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
(WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
(WebCore::SVGAnimateElementBase::setTargetElement):
(WebCore::SVGAnimateElementBase::setAttributeName):
(WebCore::SVGAnimateElementBase::resetAnimation):
(WebCore::SVGAnimateElementBase::calculateFromAndToValues):
(WebCore::SVGAnimateElementBase::calculateFromAndByValues):
(WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
(WebCore::SVGAnimateElementBase::resetAnimatedType):
(WebCore::SVGAnimateElementBase::calculateAnimatedValue):
(WebCore::SVGAnimateElementBase::applyResultsToTarget):
(WebCore::SVGAnimateElementBase::clearAnimatedType):
(WebCore::SVGAnimateElementBase::calculateDistance):
(WebCore::SVGAnimateElementBase::attributeAnimationController): Deleted.
(WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const): Deleted.
(WebCore::SVGAnimateElementBase::isAdditive const): Deleted.

  • svg/SVGAnimateElementBase.h:

(WebCore::SVGAnimateElementBase::animatorIfExists const):
(WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists const): Deleted.
The order of the functions was changed to resemble the order of running
the animation:

-- Setting the animation range
-- Starting the animation
-- Progressing the animation
-- Applying the the progressed animaVal() to the target element
-- Stopping the animation

  • svg/SVGAnimateMotionElement.cpp:

(WebCore::SVGAnimateMotionElement::calculateDistance):

  • svg/SVGAnimateMotionElement.h:
  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
(WebCore::SVGAnimationElement::shouldApplyAnimation): Deleted.

  • svg/SVGAnimationElement.h:

(WebCore::SVGAnimationElement::attributeRegistry): Deleted.
(WebCore::SVGAnimationElement::calculateDistance): Deleted.

  • svg/SVGAttributeAnimationController.cpp: Removed.
  • svg/SVGAttributeAnimationController.h: Removed.
  • svg/SVGAttributeAnimationControllerBase.cpp: Removed.
  • svg/SVGAttributeAnimationControllerBase.h: Removed.
  • svg/SVGCircleElement.h:
  • svg/SVGClipPathElement.h:
  • svg/SVGComponentTransferFunctionElement.h:
  • svg/SVGCursorElement.h:
  • svg/SVGDefsElement.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::synchronizeAttribute):
(WebCore::SVGElement::synchronizeAllAttributes):
(WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
(WebCore::createAttributeNameToAnimatedPropertyTypeMap): Deleted.
(WebCore::attributeNameToAnimatedPropertyTypeMap): Deleted.
(WebCore::createCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
(WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
(WebCore::SVGElement::animatedPropertyTypesForAttribute): Deleted.
(WebCore::SVGElement::synchronizeAnimatedSVGAttribute const): Deleted.
(WebCore::SVGElement::isAnimatableCSSProperty): Deleted.
(WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Deleted.

  • svg/SVGElement.h:

(WebCore::SVGElement::attributeOwnerProxy const): Deleted.
(WebCore::SVGElement::attributeRegistry): Deleted.
(WebCore::SVGElement::synchronizeAttribute): Deleted.
(WebCore::SVGElement::synchronizeAttributes): Deleted.
(WebCore::SVGElement::animatedTypes const): Deleted.
(WebCore::SVGElement::lookupAnimatedProperty const): Deleted.
(WebCore::SVGElement::lookupOrCreateAnimatedProperty): Deleted.
(WebCore::SVGElement::lookupOrCreateAnimatedProperties): Deleted.
(WebCore::SVGElement::isKnownAttribute): Deleted.

  • svg/SVGEllipseElement.h:
  • svg/SVGExternalResourcesRequired.h:

(WebCore::SVGExternalResourcesRequired::attributeRegistry): Deleted.
(WebCore::SVGExternalResourcesRequired::attributeOwnerProxy): Deleted.

  • svg/SVGFEBlendElement.h:
  • svg/SVGFEColorMatrixElement.h:
  • svg/SVGFEComponentTransferElement.h:
  • svg/SVGFECompositeElement.h:
  • svg/SVGFEConvolveMatrixElement.h:
  • svg/SVGFEDiffuseLightingElement.h:
  • svg/SVGFEDisplacementMapElement.h:
  • svg/SVGFEDropShadowElement.h:
  • svg/SVGFEGaussianBlurElement.h:
  • svg/SVGFEImageElement.h:
  • svg/SVGFELightElement.h:
  • svg/SVGFEMergeNodeElement.h:
  • svg/SVGFEMorphologyElement.h:
  • svg/SVGFEOffsetElement.h:
  • svg/SVGFESpecularLightingElement.h:
  • svg/SVGFETileElement.h:
  • svg/SVGFETurbulenceElement.h:
  • svg/SVGFilterElement.h:
  • svg/SVGFilterPrimitiveStandardAttributes.h:

(WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry): Deleted.

  • svg/SVGFitToViewBox.h:

(WebCore::SVGFitToViewBox::attributeRegistry): Deleted.

  • svg/SVGFontElement.h:
  • svg/SVGForeignObjectElement.h:
  • svg/SVGGElement.h:
  • svg/SVGGeometryElement.h:
  • svg/SVGGlyphRefElement.h:
  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::svgAttributeChanged):

  • svg/SVGGradientElement.h:

(WebCore::SVGGradientElement::attributeRegistry): Deleted.
(WebCore::SVGGradientElement::isKnownAttribute): Deleted.

  • svg/SVGGraphicsElement.h:

(WebCore::SVGGraphicsElement::attributeRegistry): Deleted.

  • svg/SVGImageElement.h:
  • svg/SVGLineElement.h:
  • svg/SVGLinearGradientElement.h:
  • svg/SVGMPathElement.h:
  • svg/SVGMarkerElement.cpp:
  • svg/SVGMarkerElement.h:
  • svg/SVGMaskElement.h:
  • svg/SVGPathElement.h:
  • svg/SVGPatternElement.h:
  • svg/SVGPolyElement.h:
  • svg/SVGRadialGradientElement.h:
  • svg/SVGRectElement.h:
  • svg/SVGSVGElement.h:
  • svg/SVGScriptElement.h:
  • svg/SVGStopElement.h:
  • svg/SVGSwitchElement.h:
  • svg/SVGSymbolElement.h:
  • svg/SVGTRefElement.h:
  • svg/SVGTests.cpp:

(WebCore::SVGTests::svgAttributeChanged):
(WebCore::SVGTests::attributeRegistry): Deleted.
(WebCore::SVGTests::isKnownAttribute): Deleted.

  • svg/SVGTests.h:
  • svg/SVGTextContentElement.cpp:
  • svg/SVGTextContentElement.h:

(WebCore::SVGTextContentElement::attributeRegistry): Deleted.

  • svg/SVGTextPathElement.h:
  • svg/SVGTextPositioningElement.h:

(WebCore::SVGTextPositioningElement::attributeRegistry): Deleted.

  • svg/SVGURIReference.cpp:

(WebCore::SVGURIReference::SVGURIReference):
(WebCore::SVGURIReference::attributeRegistry): Deleted.

  • svg/SVGURIReference.h:
  • svg/SVGUseElement.h:
  • svg/SVGViewElement.h:
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::SVGViewSpec):

  • svg/SVGViewSpec.h:
  • svg/SVGZoomAndPanType.h:
  • svg/properties/SVGAnimatedListPropertyTearOff.h: Removed.
  • svg/properties/SVGAnimatedPropertyAnimator.h:
  • svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
  • svg/properties/SVGAnimatedPropertyPairAnimator.h:
  • svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
  • svg/properties/SVGAnimatedPropertyTearOff.h: Removed.
  • svg/properties/SVGAnimatedPropertyType.h: Removed.
  • svg/properties/SVGAnimationAdditiveFunction.h:

(WebCore::SVGAnimationAdditiveFunction::animate):
(WebCore::SVGAnimationAdditiveFunction::progress): Deleted.

  • svg/properties/SVGAnimationAdditiveListFunctionImpl.h:

(WebCore::SVGAnimationLengthListFunction::animate):
(WebCore::SVGAnimationNumberListFunction::animate):
(WebCore::SVGAnimationPointListFunction::animate):
(WebCore::SVGAnimationTransformListFunction::animate):
(WebCore::SVGAnimationLengthListFunction::progress): Deleted.
(WebCore::SVGAnimationNumberListFunction::progress): Deleted.
(WebCore::SVGAnimationPointListFunction::progress): Deleted.
(WebCore::SVGAnimationTransformListFunction::progress): Deleted.

  • svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:

(WebCore::SVGAnimationAngleFunction::animate):
(WebCore::SVGAnimationColorFunction::animate):
(WebCore::SVGAnimationIntegerFunction::animate):
(WebCore::SVGAnimationLengthFunction::animate):
(WebCore::SVGAnimationNumberFunction::animate):
(WebCore::SVGAnimationPathSegListFunction::animate):
(WebCore::SVGAnimationRectFunction::animate):
(WebCore::SVGAnimationAngleFunction::progress): Deleted.
(WebCore::SVGAnimationColorFunction::progress): Deleted.
(WebCore::SVGAnimationIntegerFunction::progress): Deleted.
(WebCore::SVGAnimationLengthFunction::progress): Deleted.
(WebCore::SVGAnimationNumberFunction::progress): Deleted.
(WebCore::SVGAnimationPathSegListFunction::progress): Deleted.
(WebCore::SVGAnimationRectFunction::progress): Deleted.

  • svg/properties/SVGAnimationDiscreteFunction.h:

(WebCore::SVGAnimationDiscreteFunction::animate):
(WebCore::SVGAnimationDiscreteFunction::progress): Deleted.

  • svg/properties/SVGAnimationFunction.h:

(WebCore::SVGAnimationFunction::calculateDistance const):
-- Rename the 'progress()' functions of SVGAttributeAnimator and SVGAnimationFunction

to 'animate()'.

-- Rename the argument 'percentage' of these function to 'progress'
-- Make calculateDistance return Optional<float> so it does not have to

return -1 in case of error.

  • svg/properties/SVGAttribute.h: Removed.
  • svg/properties/SVGAttributeAccessor.h: Removed.
  • svg/properties/SVGAttributeAnimator.h:

(WebCore::SVGAttributeAnimator::calculateDistance const):

  • svg/properties/SVGAttributeOwnerProxy.cpp: Removed.
  • svg/properties/SVGAttributeOwnerProxy.h: Removed.
  • svg/properties/SVGAttributeOwnerProxyImpl.h: Removed.
  • svg/properties/SVGAttributeRegistry.h: Removed.
  • svg/properties/SVGLegacyAnimatedProperty.cpp: Removed.
  • svg/properties/SVGLegacyAnimatedProperty.h: Removed.
  • svg/properties/SVGLegacyProperty.h: Removed.
  • svg/properties/SVGListProperty.h: Removed.
  • svg/properties/SVGListPropertyTearOff.h: Removed.
  • svg/properties/SVGPrimitivePropertyAnimator.h:
  • svg/properties/SVGProperty.h:
  • svg/properties/SVGPropertyAnimator.h:
  • svg/properties/SVGPropertyTearOff.h: Removed.
  • svg/properties/SVGValuePropertyAnimator.h:
  • svg/properties/SVGValuePropertyListAnimator.h:
3:04 PM Changeset in webkit [243829] by commit-queue@webkit.org
  • 12 edits in trunk/Source

Add SPI to disable legacy TLS fallback
https://bugs.webkit.org/show_bug.cgi?id=196549
<rdar://44979744>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-03
Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

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

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setAllowsTLSFallback:]):
(-[WKWebsiteDataStore _allowsTLSFallback]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setSourceApplicationSecondaryIdentifier):
(WebKit::WebsiteDataStore::setAllowsTLSFallback):
(WebKit::WebsiteDataStore::setSourceApplicationBundleIdentifier):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::allowsTLSFallback const):
(WebKit::WebsiteDataStore::networkingHasBegun):
(WebKit::WebsiteDataStore::finalizeApplicationIdentifiers): Deleted.

2:46 PM Changeset in webkit [243828] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

Documents can be destroyed before their CSSFontFaceSet is destroyed
https://bugs.webkit.org/show_bug.cgi?id=195830

Reviewed by Darin Adler.

Source/WebCore:

CSSFontFaceSet has a raw pointer to its owning document. JS can keep the CSSFontFaceSet alive (by using FontFaceSet)
and can destroy the document at any time. When the document is destroyed, the link between the two objects needs to
be severed.

Test: fast/text/font-face-set-destroy-document.html

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::CSSFontFace):

  • css/CSSFontFace.h:
  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::CSSFontFaceSet):
(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):

  • css/CSSFontFaceSet.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::addFontFaceRule):

  • css/CSSFontSelector.h:
  • css/FontFace.cpp:

(WebCore::FontFace::FontFace):

LayoutTests:

  • fast/text/font-face-set-destroy-document-expected.html: Added.
  • fast/text/font-face-set-destroy-document.html: Added.
2:29 PM Changeset in webkit [243827] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-but-access-from-wrong-frame.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=194164

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations for flaky timeout
2:03 PM Changeset in webkit [243826] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Single click on links in non-read-only TextEditors should not follow links
https://bugs.webkit.org/show_bug.cgi?id=123364
<rdar://problem/15323913>

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WI._updateModifierKeys):
Add classes to the body whenever alt, shift, or ctrl are pressed.

  • UserInterface/Views/CodeMirrorEditor.js:

(WI.CodeMirrorEditor.create):
Add a read-only class if the CodeMirror is readonly.

  • UserInterface/Views/SyntaxHighlightingDefaultTheme.css:

(.cm-s-default .cm-link,):
(.read-only.cm-s-default .cm-link:hover,):
(.cm-s-default .cm-link:hover,): Deleted.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.set readOnly):
(WI.TextEditor.prototype._openClickedLinks):

1:49 PM Changeset in webkit [243825] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

Rebaseline scrollingcoordinator/scrolling-tree/fixed-inside-frame.html
https://bugs.webkit.org/show_bug.cgi?id=195254

Unreviewed test gardening.

  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt: Rebaselined test
1:37 PM Changeset in webkit [243824] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Follow up fix for r243807: Use MarkedArgumentBuffer instead of Vector for JSValue
https://bugs.webkit.org/show_bug.cgi?id=196547

Reviewed by Geoffrey Garen.

JSValue in Vector could be garbage collected because GC doesn't know Vector memory on C++ heap.

  • bindings/js/JSIDBRequestCustom.cpp:

(WebCore::JSIDBRequest::result const):

1:27 PM Changeset in webkit [243823] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Status bubble should not display certain infrastructure status messages
https://bugs.webkit.org/show_bug.cgi?id=196550

Reviewed by Lucas Forschler.

Do not display the steps which are un-needed for end-user. This information is still avaiable
if the user click on the bubble and look at the Buildbot build.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble._steps_messages):
(StatusBubble._should_display_step): Method to decide whether to display the step or not.

1:13 PM Changeset in webkit [243822] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Use https for sending data to ews-app
https://bugs.webkit.org/show_bug.cgi?id=196492

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/events.py:
1:08 PM Changeset in webkit [243821] by Chris Dumez
  • 4 edits in trunk

HTML fragment serialization should not strip whitespace from URL attribute values
https://bugs.webkit.org/show_bug.cgi?id=196551

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline WPT test now that all checks are passing. This test was already passing
in Gecko and Blink.

  • web-platform-tests/domparsing/innerhtml-mxss.sub-expected.txt:

Source/WebCore:

HTML fragment serialization should not strip whitespace from URL attribute values as per:

WebKit was stripping such whitespace, Gecko and Blink are not. Align WebKit with other
browser engines and the specification.

No new tests, rebaselined existing test.

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):

1:04 PM Changeset in webkit [243820] by rniwa@webkit.org
  • 9 edits in trunk/Source/WebCore

Crash in HTMLCanvasElement::createContext2d after the element got adopted to a new document
https://bugs.webkit.org/show_bug.cgi?id=196527

Reviewed by Antti Koivisto.

We need to update CanvasBase::m_scriptExecutionContext when HTMLCanvasElement moves from
one document to another. Fixed the bug by making CanvasBase::scriptExecutionContext make
a virtual function call instead of directly storing a raw pointer. In HTMLCanvasElement,
we use Node::scriptExecutionContext(). Use ContextDestructionObserver in CustomPaintCanvas
and OffscreenCanvas instead of a raw pointer.

Unfortunately, no new tests since there is no reproducible test case.

  • html/CanvasBase.cpp:

(WebCore::CanvasBase::CanvasBase):

  • html/CanvasBase.h:

(WebCore::CanvasBase::scriptExecutionContext const):

  • html/CustomPaintCanvas.cpp:

(WebCore::CustomPaintCanvas::CustomPaintCanvas):

  • html/CustomPaintCanvas.h:
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::HTMLCanvasElement):

  • html/HTMLCanvasElement.h:
  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::OffscreenCanvas):

  • html/OffscreenCanvas.h:
12:47 PM Changeset in webkit [243819] by mmaxfield@apple.com
  • 33 edits
    4 deletes in trunk

Remove support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=196525

Reviewed by Zalan Bujtas.

This CSS property is nonstandard and not used.

.:

  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::operator TrailingWord const): Deleted.

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForStyle):

  • rendering/SimpleLineLayoutCoverage.cpp:

(WebCore::SimpleLineLayout::printReason):

  • rendering/SimpleLineLayoutCoverage.h:
  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakClear):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::handleEndOfLine):
(WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::push): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::update): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::renderer const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::offset const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::get const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::current const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::historyLength const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::moveTo): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::increment): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::clear): Deleted.
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::trailingWord const): Deleted.
(WebCore::RenderStyle::setTrailingWord): Deleted.
(WebCore::RenderStyle::initialTrailingWord): Deleted.

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • fast/text/trailing-word-expected.html: Removed.
  • fast/text/trailing-word.html: Removed.
  • platform/gtk/TestExpectations:
  • platform/mac/fast/text/trailing-word-parse-expected.txt: Removed.
  • platform/mac/fast/text/trailing-word-parse.html: Removed.
  • platform/win/TestExpectations:
12:38 PM Changeset in webkit [243818] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Use makePendingActivity in DOMCache
https://bugs.webkit.org/show_bug.cgi?id=196515

Reviewed by Geoffrey Garen.

No change of behavior, just modernizing the code.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::retrieveRecords):
(WebCore::DOMCache::batchDeleteOperation):
(WebCore::DOMCache::batchPutOperation):

  • Modules/cache/DOMCacheStorage.cpp:

(WebCore::DOMCacheStorage::match):

12:13 PM Changeset in webkit [243817] by Chris Dumez
  • 5 edits in trunk

[XML Parser] Insert the error message block when stopping parsing and an error occurred
https://bugs.webkit.org/show_bug.cgi?id=196546

Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

Rebaseline WPT test now that all checks are passing. Both Gecko and Blink already passed
these checks.

  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-parsererror-expected.txt:

Source/WebCore:

Insert the error message block when stopping parsing and an error occurred. This is based
on the following Blink commit:

No new tests, rebaselined existing test.

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::end):
Avoid showing the error message block twice in some cases. No need to ever call
insertErrorMessageBlock() if we're already stopped since stopParsing() already
takes care of doing this.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::stopParsing):
When XMLDocumentParser::stopParsing() is called to stop parsing, call
insertErrorMessageBlock() to insert the <parsererror> element if an error
occurred.

11:05 AM Changeset in webkit [243816] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: this._computedStyleSection.focus is not a function. (In 'this._computedStyleSection.focus()', 'this._computedStyleSection.focus' is undefined)
https://bugs.webkit.org/show_bug.cgi?id=192108
<rdar://problem/46685392>

Reviewed by Devin Rousso.

This patch fixes the uncaught exception. Tabbing to and from "Properties" section continues
working the same way as before the patch.

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel.prototype.focusFirstSection): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.focusLastSection): Deleted.

11:03 AM Changeset in webkit [243815] by Kocsen Chung
  • 1 edit in trunk/Tools/Scripts/webkitpy/common/config/contributors.json

Adding myself to contributors.json.

Unreviewed contributors.json update.

10:54 AM Changeset in webkit [243814] by youenn@apple.com
  • 2 edits in trunk/Tools

Add a test for DOMCache on multiple browsing in case of private browsing
https://bugs.webkit.org/show_bug.cgi?id=196524

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

(-[SWMessageHandlerForCacheStorage userContentController:didReceiveScriptMessage:]):

10:48 AM Changeset in webkit [243813] by Chris Dumez
  • 8 edits
    11 adds
    1 delete in trunk/LayoutTests/imported/w3c

Re-sync web-platform-tests/domparsing from upstream
https://bugs.webkit.org/show_bug.cgi?id=196544

Reviewed by Alex Christensen.

Re-sync web-platform-tests/domparsing from upstream 3bfdeb8976fc5.

  • web-platform-tests/domparsing/*: Updated
  • web-platform-tests/interfaces/DOM-Parsing.idl: Added.
10:45 AM Changeset in webkit [243812] by youenn@apple.com
  • 6 edits in trunk/Source/WebCore

Clear WorkerCacheStorageConnection callbacks on WorkerGlobalScope termination
https://bugs.webkit.org/show_bug.cgi?id=196521

Reviewed by Alex Christensen.

When the worker global scope is preparing for termination,
all ActiveDOMObjects are stopped.
At that time, the completion handlers related to
WorkerCacheStorageConnection should be cleared to be able to free
memory, and as they are now no-op anyway.

We clear the completion handlers once the active DOM objects are stopped
to limit the processing triggered by clearing them.

Introducing a new Stopped error code to handle this case.
Add an assertion so that this error does not surface to JS.

Covered by existing tests.

  • Modules/cache/CacheStorageConnection.cpp:

(WebCore::CacheStorageConnection::clearPendingRequests):

  • Modules/cache/CacheStorageConnection.h:
  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::errorToException):

  • Modules/cache/DOMCacheEngine.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::prepareForTermination):
(WebCore::WorkerGlobalScope::stopIndexedDatabase):

10:37 AM Changeset in webkit [243811] by youenn@apple.com
  • 7 edits in trunk/Source

Adopt new VCP SPI
https://bugs.webkit.org/show_bug.cgi?id=193357
<rdar://problem/43656651>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Enable VCP through VTB API with specific encoder id.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp:
  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::setApplicationStatus):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:

(-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

Source/WebCore:

Covered by existing tests.

  • testing/Internals.cpp:

(WebCore::Internals::supportsVCPEncoder):

10:27 AM Changeset in webkit [243810] by Chris Dumez
  • 6 edits in trunk

Remove legacy webkitRequestAnimationFrame time quirk
https://bugs.webkit.org/show_bug.cgi?id=196458
<rdar://problem/49490207>

Reviewed by Simon Fraser.

Source/WebCore:

Remove legacy webkitRequestAnimationFrame time quirk and log a deprecation
warning whenever webkitRequestAnimationFrame is called.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::serviceScriptedAnimations):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::requestAnimationFrame):
(WebCore::DOMWindow::webkitRequestAnimationFrame):

LayoutTests:

Rebaseline webkitRequestAnimationFrame layout test now that we log a deprecation
warning.

  • fast/animation/request-animation-frame-prefix-expected.txt:
10:23 AM Changeset in webkit [243809] by commit-queue@webkit.org
  • 4 edits in trunk

Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attribution.html
https://bugs.webkit.org/show_bug.cgi?id=196476

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-03
Reviewed by Chris Dumez.

Source/WebKit:

Re-apply a change I reverted in r241754 now that it's safe to do so.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

LayoutTests:

  • http/tests/adClickAttribution/store-ad-click-attribution-expected.txt:
10:06 AM Changeset in webkit [243808] by commit-queue@webkit.org
  • 14 edits
    1 copy
    3 adds in trunk

[iOS] Should be able to dismiss picker or popover using the keyboard
https://bugs.webkit.org/show_bug.cgi?id=196272
<rdar://problem/48943170>

Patch by Daniel Bates <dabates@apple.com> on 2019-04-03
Reviewed by Wenson Hsieh.

Source/WebKit:

Intercept key events and route them to the current input peripheral (if we have one). Add a base key event handler
for all form peripherals that dismisses the accessory when either the Escape key is pressed or Command + . is pressed.
I will fix this issue for the file upload picker/popover in <https://bugs.webkit.org/show_bug.cgi?id=196287>.

  • SourcesCocoa.txt: Add file WKFormPeripheralBase.mm.
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView endEditingAndUpdateFocusAppearanceWithReason]): Added.
(-[WKContentView resignFirstResponderForWebView]): Write in terms of -endEditingAndUpdateFocusAppearance.
(-[WKContentView inputView]): Code style nit while I am here; add an empty line to demarcate the "crazy"
code that the FIXME is referring to and should ideally be removed from the code that is sane to always do.
(-[WKContentView accessoryDone]): When the accessory is dismissed via the Done button (iPhone) or by pressing
Escape or Command + . using a hardware keyboard (iPhone or iPad) then end the current editing session, but
do not resign first responder status as the page activation state should not be changed.
(-[WKContentView _handleKeyUIEvent:]): Bring back this code when building with USE(UIKIT_KEYBOARD_ADDITIONS)
as we need to route key events to the input peripheral (if we have one). If the input peripheral handles it
then we're done: no need to let UIKit or WebKit handle it when building with USE(UIKIT_KEYBOARD_ADDITIONS),
respectively. If the input peripheral does not handle it then do what we do now.
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
If the element is re-focused and we have an input peripheral then we want to ensure we are first responder,
reveal the focused element, update the accessory and tell the peripheral that editing has begun (again).
For all other element re-focusing where we don't have a peripheral do what we do now. Also, update _isEditable
to reflect whether the focused element contains selectable text. This is what UIKit wants to know when it queries
-isEditable. Now that we no longer blur the focused element on iPad when the popover is dismissed and keep the
peripheral until there is a focus change we need to ensure that we give the correct answer to UIKit on view
editability. Otherwise, UIKit thinks it needs to update the text selection state when a popup button is tapped
again (as part of its gesture recognizer logic) and this causes an assertion failure in UIKit after it calls back
into us to ask for selection details, which we correctly respond with the equivalent of "we have none" and is
not the answer UIKit expects since we told it we are editable. (Currently we manage to get away with telling UIKit
we are always editable because it is not possible to perform a selection operation when we have a popover open.
Closing the popover blurs the element, setting -isEditable to NO and deallocates the peripheral avoiding this issue).

  • UIProcess/ios/forms/WKFormColorControl.h:
  • UIProcess/ios/forms/WKFormColorControl.mm:

(-[WKColorPopover controlEndEditing]): Dismiss the popover.
(-[WKFormColorControl initWithView:]): Modified to call base class initializer.
(-[WKFormColorControl assistantView]): Deleted.
(-[WKFormColorControl beginEditing]): Deleted.
(-[WKFormColorControl endEditing]): Deleted.

  • UIProcess/ios/forms/WKFormInputControl.h:
  • UIProcess/ios/forms/WKFormInputControl.mm:

(-[WKFormInputControl initWithView:]): Modified to call base class initializer.
(-[WKFormInputControl dateTimePickerCalendarType]): Write in terms of self.control.
(-[WKDateTimePopover controlEndEditing]): Dismiss the popover and tell the controller that editing ended.
(-[WKFormInputControl beginEditing]): Deleted.
(-[WKFormInputControl endEditing]): Deleted.
(-[WKFormInputControl assistantView]): Deleted.

  • UIProcess/ios/forms/WKFormPeripheral.h:
  • UIProcess/ios/forms/WKFormPeripheralBase.h: Added.
  • UIProcess/ios/forms/WKFormPeripheralBase.mm: Added.

(-[WKFormPeripheralBase initWithView:control:]): Take ownership of the passed WKFormControl.
(-[WKFormPeripheralBase beginEditing]): Turn around and tell the control.
(-[WKFormPeripheralBase endEditing]): Ditto.
(-[WKFormPeripheralBase assistantView]): Ditto.
(-[WKFormPeripheralBase control]): Return the control.
(-[WKFormPeripheralBase handleKeyEvent:]): Dismiss the accessory (in the same way we dismiss when the Done
button is pressed on iPhone) on keydown of the Escape key or when we receive a UIKeyInputEscape event (for
Command + .).

  • UIProcess/ios/forms/WKFormSelectControl.h:
  • UIProcess/ios/forms/WKFormSelectControl.mm:

(-[WKFormSelectControl initWithView:]): Modified to call base class initializer.
(-[WKFormSelectControl selectRow:inComponent:extendingSelection:]): Write in terms of self.control.
(-[WKFormSelectControl selectFormPopoverTitle]): Ditto.
(-[WKFormSelectControl assistantView]): Deleted.
(-[WKFormSelectControl beginEditing]): Deleted.
(-[WKFormSelectControl endEditing]): Deleted.

  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectPopover controlEndEditing]): Dismiss the popover.

  • WebKit.xcodeproj/project.pbxproj: Add files WKFormPeripheralBase.{h, mm}.

LayoutTests:

Add test to ensure that pressing Escape or Command + . dismisses a picker.

  • fast/forms/ios/dismiss-picker-using-keyboard-expected.txt: Added.
  • fast/forms/ios/dismiss-picker-using-keyboard.html: Added.
10:03 AM Changeset in webkit [243807] by sihui_liu@apple.com
  • 31 edits
    3 adds in trunk

Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
https://bugs.webkit.org/show_bug.cgi?id=196128

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Updated test expectations to PASS.

  • web-platform-tests/IndexedDB/nested-cloning-large-expected.txt:
  • web-platform-tests/IndexedDB/nested-cloning-large-multiple-expected.txt:
  • web-platform-tests/IndexedDB/nested-cloning-small-expected.txt:

Source/WebCore:

If a key is auto-generated, it should become a property of the value object. Network process would perform the
key injection by deserializing IDBValue into script value, setting the property, serializing the result and
storing it in a database record. But network process does not have a JSDOMGlobalObject, so it would fail to
deserialize types including Blob and File.

To solve this issue, we move the key injection to web process and let network process store the original value
it gets. In this case, when web process asks for some value, network process should return key, value and key
path so that web process can decide whether it should perform a key injection before returning the result. Note
that the auto-generated key would always be stored as the key in a ObjectStore record.

Test: storage/indexeddb/modern/objectstore-autoincrement-types.html

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::setGetResult):

  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::primaryKeyPath):

  • Modules/indexeddb/IDBGetAllResult.cpp:

(WebCore::IDBGetAllResult::isolatedCopy):
(WebCore::IDBGetAllResult::addKey):
(WebCore::IDBGetAllResult::addValue):
(WebCore::IDBGetAllResult::keys const):
(WebCore::IDBGetAllResult::values const):
(WebCore::IDBGetAllResult::allBlobFilePaths const):
(WebCore::isolatedCopyOfVariant): Deleted.

  • Modules/indexeddb/IDBGetAllResult.h: Introduce an IDBKeyPath parameter. Also replace Variant with two Vectors,

because we only needed to store either key or value before, and now the stored value could be incomplete.
(WebCore::IDBGetAllResult::IDBGetAllResult):
(WebCore::IDBGetAllResult::keyPath const):
(WebCore::IDBGetAllResult::encode const):
(WebCore::IDBGetAllResult::decode):

  • Modules/indexeddb/IDBGetResult.cpp:

(WebCore::IDBGetResult::setValue):

  • Modules/indexeddb/IDBGetResult.h:

(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::keyPath const):

  • Modules/indexeddb/IDBObjectStore.cpp:
  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):

  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::didGetAllRecordsOnServer):
(WebCore::IDBTransaction::didGetRecordOnServer):

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):

  • Modules/indexeddb/server/MemoryIndex.cpp:

(WebCore::IDBServer::MemoryIndex::getResultForKeyRange const):
(WebCore::IDBServer::MemoryIndex::getAllRecords const):

  • Modules/indexeddb/server/MemoryIndexCursor.cpp:

(WebCore::IDBServer::MemoryIndexCursor::currentData):

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
(WebCore::IDBServer::MemoryObjectStore::getAllRecords const):

  • Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:

(WebCore::IDBServer::MemoryObjectStoreCursor::currentData):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::currentData):

  • Modules/indexeddb/server/SQLiteIDBCursor.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Remove the key injection from network process.
UniqueIDBDatabase stores any value it gets from IDBClient.

  • Modules/indexeddb/shared/IDBResultData.cpp:

(WebCore::IDBResultData::getResultRef):

  • Modules/indexeddb/shared/IDBResultData.h:
  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::injectIDBKeyIntoScriptValue): If property is read-only, set would fail and injectKeyIntoResult would
return null, but we expect it to return result as long as the property value is the same as target. Therefore,
we can add an early return here.
(WebCore::createKeyPathArray):

(WebCore::generateIndexKeyForValue): We used to generate IndexKey from value stored in database but now the
value gets stored does not include auto-generated key, as we remove the key injection from network process. In
this case if the IDBIndex has the same key path as the auto-generated key, IndexKey would be failed to create
for it cannot extract auto-generated key from value. Since the auto-generated key would always be the key in
database record, we could use value of that key when we find a match in key path.

(WebCore::deserializeIDBValueWithKeyInjection): If the key path in the result is single entry, the key is
probably auto-generated, so we could inject the result key into the result value unconditionally.

  • bindings/js/IDBBindingUtilities.h:
  • bindings/js/JSIDBCursorWithValueCustom.cpp:

(WebCore::JSIDBCursorWithValue::value const):

  • bindings/js/JSIDBRequestCustom.cpp:

(WebCore::JSIDBRequest::result const):

LayoutTests:

  • TestExpectations:
  • storage/indexeddb/modern/objectstore-autoincrement-types-expected.txt: Added.
  • storage/indexeddb/modern/objectstore-autoincrement-types.html: Added.
  • storage/indexeddb/modern/resources/objectstore-autoincrement-types.js: Added.

(next):
(prepareDatabase.event.target.onsuccess):
(prepareDatabase):
(testSteps):

10:00 AM Changeset in webkit [243806] by youenn@apple.com
  • 7 edits in trunk

Resetting quota should take into account third party origins
https://bugs.webkit.org/show_bug.cgi?id=196462

Reviewed by Geoffrey Garen.

Source/WebKit:

When clearing the storage quota, we were resetting it to the default value
without taking care of whether third party or not.
Updated the code to ensure that the default quota is computed based on the origin.

Updated existing test to cover this case.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::clearStorageQuota):
(WebKit::NetworkProcess::setCacheStorageParameters):
(WebKit::NetworkProcess::updateQuotaBasedOnSpaceUsageForTesting):
(WebKit::NetworkProcess::storageQuotaManager):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::StorageQuotaManagers::defaultQuota const):
(WebKit::NetworkProcess::StorageQuotaManagers::setDefaultQuotas):
(WebKit::NetworkProcess::StorageQuotaManagers::managersPerOrigin):

LayoutTests:

  • http/wpt/cache-storage/quota-third-party.https-expected.txt:
  • http/wpt/cache-storage/quota-third-party.https.html:
  • platform/mac-wk2/TestExpectations:
9:53 AM Changeset in webkit [243805] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed gardening, update test expectations

  • platform/gtk/TestExpectations:
9:41 AM WebKitGTK/2.24.x edited by Michael Catanzaro
(diff)
9:40 AM Changeset in webkit [243804] by Michael Catanzaro
  • 10 edits
    4 deletes in trunk

Get rid of HTMLInputElement::setEditingValue
https://bugs.webkit.org/show_bug.cgi?id=196402

Reviewed by Darin Adler.

Source/WebCore:

HTMLInputElement::setEditingValue is only used for Epiphany password autofill. We did it
this way because that's what Chrome uses for autofill, but Apple uses
HTMLInputElement::setValueForUser. Let's switch to that instead, then we can get rid of
setEditingValue.

This fixes logging into ting.com after username and password are autofilled by Epiphany.
Before this change, the login would fail unless you first manually edit either the username
or the password field.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setEditingValue): Deleted.

  • html/HTMLInputElement.h:
  • testing/Internals.cpp:

(WebCore::Internals::setEditingValue): Deleted.

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

Source/WebKit:

  • WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_html_input_element_set_editing_value):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:

(webkit_dom_html_input_element_set_editing_value):

LayoutTests:

  • fast/forms/editing-value-expected.txt: Removed.
  • fast/forms/editing-value-null-renderer-expected.txt: Removed.
  • fast/forms/editing-value-null-renderer.html: Removed.
  • fast/forms/editing-value.html: Removed.
9:39 AM Changeset in webkit [243803] by Jonathan Bedard
  • 2 edits in trunk/Tools

[ews] Clean out ~/Library/Logs/CoreSimulator/ on reboot
https://bugs.webkit.org/show_bug.cgi?id=196540

Reviewed by Aakash Jain.

  • EWSTools/start-queue-mac.sh: Remove CoreSimulator logs.
9:30 AM Changeset in webkit [243802] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

The following layout tests are flaky failures
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay.html
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/error-codes/error.html
https://bugs.webkit.org/show_bug.cgi?id=195466

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations: Updating test expectations for flaky failures
9:14 AM Changeset in webkit [243801] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

Layout Test http/wpt/resource-timing/rt-resources-per-worker.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=180260

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:02 AM Changeset in webkit [243800] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Add a WebKit internal feature flag to always enable modern compatibility mode by default
https://bugs.webkit.org/show_bug.cgi?id=196526
<rdar://problem/49532923>

Reviewed by Antoine Quint.

  • Shared/WebPreferences.yaml:
8:58 AM Changeset in webkit [243799] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Missing includes that were previously provided via UnifiedSources
https://bugs.webkit.org/show_bug.cgi?id=196434

Unreviewed build fix.

Patch by Pablo Saavedra <Pablo Saavedra> on 2019-04-03

  • html/InputType.h:
8:22 AM Changeset in webkit [243798] by Wenson Hsieh
  • 9 edits
    1 copy in trunk/Source

Introduce and add plumbing for a website policy for meta viewport tag handling
https://bugs.webkit.org/show_bug.cgi?id=196285

Reviewed by Tim Horton.

Source/WebCore:

Add MetaViewportPolicy to DocumentLoader. See WebKit ChangeLog for more detail.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::metaViewportPolicy const):
(WebCore::DocumentLoader::setMetaViewportPolicy):

Source/WebKit:

Add WebsiteMetaViewportPolicy, a bit that can be used to determine whether to respect or ignore the meta
viewport tag and use native web page parameters instead of the default parameters.

  • Shared/WebsiteMetaViewportPolicy.h: Copied from Source/WebKit/Shared/WebsitePoliciesData.h.
  • Shared/WebsitePoliciesData.cpp:

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

Convert WebKit::WebsiteMetaViewportPolicy into WebCore::MetaViewportPolicy.

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

(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:

Add additional plumbing for the policy flag.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::resetViewportDefaultConfiguration):

Use native web page parameters if either "shouldIgnoreMetaViewport" is enabled, or the new policy is set.
Eventually, the policy should completely replace the former preference once no internal clients depend on it.

8:02 AM Changeset in webkit [243797] by Wenson Hsieh
  • 10 edits
    2 adds in trunk

Add plumbing for a compatibility mode preference in WebKit
https://bugs.webkit.org/show_bug.cgi?id=196005

Reviewed by Tim Horton.

Source/WebKit:

Add plumbing between the Cocoa API object (WKWebpagePreferences) and the inner C++ API object
(API::WebsitePolicies) for compatibility mode.

  • Shared/WebCompatibilityMode.h: Added.
  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::adjustPoliciesForCompatibilityMode):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Add new API tests.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/ios/PreferredCompatibilityMode.mm: Added.
6:00 AM Changeset in webkit [243796] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[CoordinatedGraphics] Hidden pages are not suspended after a web view resize
https://bugs.webkit.org/show_bug.cgi?id=196487

Reviewed by Žan Doberšek.

When resizing the window, the hidden tabs are updated too, to avoid flickering or getting the old size when
switching tabs. For that we need to resume painting but we are not suspending it again after the update.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState): Suspend the painting again after a
synchronous update if needed.

5:42 AM Changeset in webkit [243795] by Joseph Pecoraro
  • 9 edits in trunk/Source

Web Inspector: Remote Inspector indicate callback should always happen on the main thread
https://bugs.webkit.org/show_bug.cgi?id=196513
<rdar://problem/49498284>

Reviewed by Devin Rousso.

Source/JavaScriptCore:

  • inspector/remote/cocoa/RemoteInspectorCocoa.mm:

(Inspector::RemoteInspector::receivedIndicateMessage):
When we have a WebThread, don't just run on the WebThread,
run on the MainThread with the WebThreadLock.

Source/WebCore:

  • platform/ios/wak/WebCoreThreadSystemInterface.cpp:

(InitWebCoreThreadSystemInterface):

Source/WTF:

  • wtf/MainThread.h:
  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::dispatchAsyncOnMainThreadWithWebThreadLockIfNeeded):

  • wtf/ios/WebCoreThread.cpp:
  • wtf/ios/WebCoreThread.h:
1:33 AM Changeset in webkit [243794] by Claudio Saavedra
  • 3 edits in trunk/Tools

[WPE][GTK] Update libsrtp dependency package for Debian
https://bugs.webkit.org/show_bug.cgi?id=196528

Reviewed by Frédéric Wang.

  • gtk/install-dependencies:
  • wpe/install-dependencies:
1:25 AM Changeset in webkit [243793] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

Web Inspector: [GTK] Copy copies to nowhere
https://bugs.webkit.org/show_bug.cgi?id=181228

Reviewed by Michael Catanzaro.

The thing is that those items are actually submenu items, with options, for example in the case of Copy to copy
HTML, Text, XPath, etc. We are not correctly handling submenus when populating the context menu received from
the web process.

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::populateSubMenu): Helper to populate submenu items recursively.
(WebKit::WebContextMenuProxyGtk::populate): Handle submenu items.

  • UIProcess/gtk/WebContextMenuProxyGtk.h:
Note: See TracTimeline for information about the timeline view.