⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Apr 8, 2020:

11:14 PM Changeset in webkit [259783] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

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

Unreviewed gardening.

Clean up tests expected to fail but passed.

  • platform/gtk/TestExpectations:
11:00 PM Changeset in webkit [259782] by Ryan Haddad
  • 7 edits in trunk/LayoutTests

Unreviewed test gardening, remove expectations for tests that are now consistently passing.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/ipad/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
10:10 PM Changeset in webkit [259781] by Devin Rousso
  • 25 edits in trunk

Web Inspector: Debugger: treat comma sub-expressions as separate statements
https://bugs.webkit.org/show_bug.cgi?id=209998

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Minifiers sometimes use , instead of ; as a way of compressing multiple statements into
a single statement (e.g. inside an if conditional). This makes stepping through minified
code much less useful, as our current stepping logic is based on expressions (not including
step in or step out). In most cases, we do actually want to treat each sub-expression in a
comma expression as a statement so as to emulate the behaviour as if there were ; instead.

  • bytecompiler/NodesCodegen.cpp:

(JSC::CommaNode::emitBytecode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseVariableDeclarationList):
(Parser<LexerType>::parseExpression):
Shift the location of subsequent sub-expressions to be after the comma. Add breakpoint pause
locations for each subsequent sub-expression.

Source/WebInspectorUI:

Minifiers sometimes use , instead of ; as a way of compressing multiple statements into
a single statement (e.g. inside an if conditional). This makes stepping through minified
code much less useful, as our current stepping logic is based on expressions (not including
step in or step out). In most cases, we do actually want to treat each sub-expression in a
comma expression as a statement so as to emulate the behaviour as if there were ; instead.

  • UserInterface/Workers/Formatter/JSFormatter.js:

(JSFormatter.prototype._isLikelyToHaveNewline):
(JSFormatter.prototype._handleTokenAtNode):
Put each sub-expression in a comma expression on it's own line.

LayoutTests:

  • inspector/debugger/breakpoints/resources/dump-functions.js:
  • inspector/debugger/breakpoints/resources/dump-general.js:
  • inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
  • inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
  • inspector/debugger/stepping/stepOver.html:
  • inspector/debugger/stepping/stepOver-expected.txt:
  • inspector/debugger/stepping/stepping-function-calls.html:
  • inspector/debugger/stepping/stepping-function-calls-expected.txt:
  • inspector/debugger/stepping/stepping-loops.html:
  • inspector/debugger/stepping/stepping-loops-expected.txt:
  • inspector/debugger/stepping/stepping-misc.html:
  • inspector/debugger/stepping/stepping-misc-expected.txt:
  • inspector/formatting/resources/javascript-tests/for-statements.js:
  • inspector/formatting/resources/javascript-tests/for-statements-expected.js:
  • inspector/formatting/resources/javascript-tests/if-statements.js:
  • inspector/formatting/resources/javascript-tests/if-statements-expected.js:
  • inspector/formatting/resources/javascript-tests/sample-jquery-expected.js:
  • inspector/formatting/resources/javascript-tests/sample-jquery-expected.js:
9:33 PM Changeset in webkit [259780] by ddkilzer@apple.com
  • 4 edits in trunk/Source

WTF::Persistence::VectorCoder and IPC::VectorArgumentCoder should use checked arithmetic
<https://webkit.org/b/210227>
<rdar://problem/60832243>

Reviewed by Alex Christensen.

Source/WebKit:

  • Platform/IPC/ArgumentCoders.h:

(IPC::VectorArgumentCoder::decode):

  • Use safeCast<> to cast from uint64_t to size_t.
  • Use checked arithemtic for multiplication.

Source/WTF:

  • wtf/persistence/PersistentCoders.h:

(WTF::Persistence::VectorCoder::decode):

  • Use checked arithemtic for multiplication.
9:01 PM Changeset in webkit [259779] by ap@apple.com
  • 2 edits in trunk/Source/WebKit

Fix WebContent process launching after r259758.

  • WebProcess/com.apple.WebProcess.sb.in:
8:32 PM Changeset in webkit [259778] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Enable incremental PDF loading.
<rdar://problem/60396263> and https://bugs.webkit.org/show_bug.cgi?id=210241

Reviewed by Tim Horton.

  • FeatureFlags/WebKit.plist:
8:17 PM Changeset in webkit [259777] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[WPE] Gardening, update baselines after r259296
https://bugs.webkit.org/show_bug.cgi?id=210242

Unreviewed gardening.

  • platform/wpe/css2.1/20110323/margin-applies-to-006-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-012-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:
7:40 PM Changeset in webkit [259776] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

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

Unreviewed gardening.

  • platform/wpe/TestExpectations:
6:37 PM Changeset in webkit [259775] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

UserMediaCaptureManagerProxy::clone should validate its parameters
<https://webkit.org/b/210221>
<rdar://problem/61063019>

Reviewed by Alex Christensen.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(MESSAGE_CHECK): Define (and undef) new macro for assertion.
(WebKit::UserMediaCaptureManagerProxy::clone): Change ASSERT()
to MESSAGE_CHECK().

6:10 PM Changeset in webkit [259774] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

WebKit::ShareableBitmap::Handle::decode() should validate m_size instance variables
<https://webkit.org/b/210211>
<rdar://problem/60543986>

Reviewed by Alex Christensen.

  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::Handle::decode): Return early if
either m_size instance variable is less than zero.

5:43 PM Changeset in webkit [259773] by Chris Dumez
  • 7 edits
    2 adds in trunk

querySelector("#\u0000") should match an element with ID U+FFFD
https://bugs.webkit.org/show_bug.cgi?id=210119

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import test coverage from upstream WPT.

  • web-platform-tests/dom/nodes/ParentNode-querySelector-escapes-expected.txt: Added.
  • web-platform-tests/dom/nodes/ParentNode-querySelector-escapes.html: Added.

Source/WebCore:

As per the specification [1][2], we should preprocess the input string before performing
CSS tokenization. The preprocessing step replaces certain characters in the input string.

However, our code did not have this preprocessing step and instead was trying to deal
with those characters during tokenization. This is however not working as expected for
the '\0' character (which is supposed to be replaced with U+FFFD REPLACEMENT CHARACTER)
because our code deals with StringViews of the input String and just converts part of
the input stream to Strings / AtomStrings.

To address the issue, this patch adds a preprocessing step that replaces the '\0'
character with the U+FFFD REPLACEMENT CHARACTER). I opted not to replace '\r' or '\f'
characters since our tokenizer seems to be dealing fine with those.

[1] https://drafts.csswg.org/css-syntax/#input-preprocessing
[2] https://drafts.csswg.org/css-syntax/#parser-entry-points

Test: imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-escapes.html

  • css/parser/CSSTokenizer.cpp:

(WebCore::preprocessString):
(WebCore::CSSTokenizer::CSSTokenizer):
(WebCore::CSSTokenizer::lessThan):
(WebCore::CSSTokenizer::hyphenMinus):
(WebCore::CSSTokenizer::hash):
(WebCore::CSSTokenizer::reverseSolidus):
(WebCore::CSSTokenizer::letterU):
(WebCore::CSSTokenizer::consumeNumber):
(WebCore::CSSTokenizer::consumeIdentLikeToken):
(WebCore::CSSTokenizer::consumeStringTokenUntil):
(WebCore::CSSTokenizer::consumeUnicodeRange):
(WebCore::CSSTokenizer::consumeUrlToken):
(WebCore::CSSTokenizer::consumeBadUrlRemnants):
(WebCore::CSSTokenizer::consumeSingleWhitespaceIfNext):
(WebCore::CSSTokenizer::consumeIfNext):
(WebCore::CSSTokenizer::consumeName):
(WebCore::CSSTokenizer::consumeEscape):
(WebCore::CSSTokenizer::nextTwoCharsAreValidEscape):
(WebCore::CSSTokenizer::nextCharsAreNumber):
(WebCore::CSSTokenizer::nextCharsAreIdentifier):

  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

(WebCore::CSSTokenizerInputStream::nextInputChar const):
(WebCore::CSSTokenizerInputStream::peek const):
(WebCore::CSSTokenizerInputStream::peekWithoutReplacement const): Deleted.

Source/WTF:

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::replace):
Slightly optimize the 16-bit code path of StringImpl::replace(). Since we know
there is no character match from indexes 0 to i, we can simply use memcpy for
this range.

5:42 PM Changeset in webkit [259772] by commit-queue@webkit.org
  • 10 edits in trunk

_corsDisablingPatterns should allow security policy access to those patterns
https://bugs.webkit.org/show_bug.cgi?id=210218
<rdar://problem/61395166>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-08
Reviewed by Timothy Hatcher.

Source/WebCore:

This gives WKWebViewConfiguration._corsDisablingPatterns power similar to WKBundleAddOriginAccessWhitelistEntry
but its API is per-WKWebView (even if its implementation is unfortunately currently process global in the web process).
Functionality covered by a new API test.

  • page/Page.cpp:

(WebCore::m_loadsFromNetwork):

  • page/PageConfiguration.h:
  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canRequest const):
(WebCore::SecurityOrigin::canDisplay const):

  • page/SecurityPolicy.cpp:

(WebCore::originAccessPatterns):
(WebCore::SecurityPolicy::isAccessWhiteListed):
(WebCore::SecurityPolicy::allowAccessTo):
(WebCore::SecurityPolicy::isAccessToURLWhiteListed): Deleted.

  • page/SecurityPolicy.h:

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_processDisplayName):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
5:41 PM Changeset in webkit [259771] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION(r257758): Launch time performance regression
https://bugs.webkit.org/show_bug.cgi?id=210157
<rdar://problem/61119881>

Reviewed by Alex Christensen.

Address a launch time performance regression in the WebProcessPool constructor
by starting a potentially slow server call in the constructor, and only waiting
for its result if it has not been received when the value is needed.

  • UIProcess/WebProcessPool.cpp:

(WebProcessPool::WebProcessPool): Start initialization function in constructor,
rather than blocking for the

5:38 PM Changeset in webkit [259770] by commit-queue@webkit.org
  • 4 edits in trunk

WKWebViews should behave as if they had loaded something after restoring session state
https://bugs.webkit.org/show_bug.cgi?id=210097
<rdar://problem/58778490>

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

Source/WebKit:

Specifically, we don't want to close a WKWebView after restoring the session state into another
WKWebView into it then navigating to a phishing page. We want to be at the previous page after
the user clicks "Go back".

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::restoreFromSessionState):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(TEST):

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

Cherry-pick r259766. rdar://problem/61487124

REGRESSION (r258525): Occasional crashes under TextManipulationController::observeParagraphs
https://bugs.webkit.org/show_bug.cgi?id=210215
<rdar://problem/61362512>

Reviewed by Darin Adler.

In the case where startOfParagraph or endOfParagraph return a null Position, we end up crashing under
TextManipulationController::observeParagraphs while creating ParagraphContentIterator, which expects non-null
Positions because it dereferences the result of makeBoundaryPoint.

Avoid this crash for now by bailing if either the start or end positions are null. Tests to be added in a
followup patch.

  • editing/TextManipulationController.cpp: (WebCore::TextManipulationController::observeParagraphs):

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

5:20 PM Changeset in webkit [259768] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Add curly braces after one line if statement for the case when we aren't using the internal SDK
https://bugs.webkit.org/show_bug.cgi?id=210225
<rdar://problem/61485209>

Reviewed by David Kilzer.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::initializeAppBoundDomains):

5:06 PM Changeset in webkit [259767] by Ross Kirsling
  • 51 edits in trunk

Remove ENABLE_INTL define
https://bugs.webkit.org/show_bug.cgi?id=210164

Reviewed by Darin Adler.

.:

  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Scripts/generateIntlCanonicalizeLanguage.py:
  • builtins/DatePrototype.js:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToLocaleString):

  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::finishCreation):

  • runtime/IntlCollator.cpp:
  • runtime/IntlCollator.h:
  • runtime/IntlCollatorConstructor.cpp:
  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlCollatorPrototype.cpp:
  • runtime/IntlCollatorPrototype.h:
  • runtime/IntlDateTimeFormat.cpp:
  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.cpp:
  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:
  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormat.cpp:
  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.cpp:
  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlNumberFormatPrototype.cpp:
  • runtime/IntlNumberFormatPrototype.h:
  • runtime/IntlObject.cpp:
  • runtime/IntlObject.h:
  • runtime/IntlObjectInlines.h:
  • runtime/IntlPluralRules.cpp:
  • runtime/IntlPluralRules.h:
  • runtime/IntlPluralRulesConstructor.cpp:
  • runtime/IntlPluralRulesConstructor.h:
  • runtime/IntlPluralRulesPrototype.cpp:
  • runtime/IntlPluralRulesPrototype.h:
  • runtime/JSGlobalObject.cpp:

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

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::defaultCollator const):
(JSC::JSGlobalObject::pluralRulesStructure):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncDateTimeFormat):

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToLocaleString):

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncToLocaleUpperCase):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WTF:

AppleWin (and, following suit, FTW) was the only upstream platform turning ENABLE_INTL off;
now that their headers have been upgraded to ICU 62, this define can be removed entirely.

Going forward, we thus assume JSC has an Intl object and can simply runtime-guard any new features added to it.

  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
4:59 PM Changeset in webkit [259766] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

REGRESSION (r258525): Occasional crashes under TextManipulationController::observeParagraphs
https://bugs.webkit.org/show_bug.cgi?id=210215
<rdar://problem/61362512>

Reviewed by Darin Adler.

In the case where startOfParagraph or endOfParagraph return a null Position, we end up crashing under
TextManipulationController::observeParagraphs while creating ParagraphContentIterator, which expects non-null
Positions because it dereferences the result of makeBoundaryPoint.

Avoid this crash for now by bailing if either the start or end positions are null. Tests to be added in a
followup patch.

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::observeParagraphs):

4:50 PM Changeset in webkit [259765] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Handle [PDFDocument initWithProvider:] returning nil
<rdar://problem/61482395> and https://bugs.webkit.org/show_bug.cgi?id=210224

Reviewed by Geoff Garen.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::threadEntry): Treat a nil PDFDocument as "non-linearized, fallback to normal loading"

3:57 PM Changeset in webkit [259764] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Release WebGLLayer earlier in ~GraphicsContextGLOpenGL
https://bugs.webkit.org/show_bug.cgi?id=210213

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

Release WebGLLayer earlier and remove public context property,
which is no longer called.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):

  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:
3:55 PM Changeset in webkit [259763] by Jason_Lawrence
  • 3 edits in trunk/LayoutTests

REGRESSION: [ Mojave wk1 Debug and iOS wk2 Debug ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky timing out and crashing.
https://bugs.webkit.org/show_bug.cgi?id=210219

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
3:41 PM Changeset in webkit [259762] by dbates@webkit.org
  • 35 edits
    29 adds in trunk

Track editable elements on screen
https://bugs.webkit.org/show_bug.cgi?id=209888
<rdar://problem/61196886>

Reviewed by Simon Fraser.

Source/JavaScriptCore:

Add feature define to track editable elements on screen (enabled by default on iOS and iOS Simulator).

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Amend EventRegion to store a region of all the hit test visible rects of editable elements
on the page. This data will be sent over to the UI process so that it can quickly determine
if a search rect would intersect any editable elements.

An element is considered editable if it has CSS -webkit-user-modify value that isn't read-only.
Note that the value of the HTML content attribute contenteditable is internally converted to
its -webkit-user-modify equivalent (e.g. contenteditable="true" <=> "-webkit-user-modify: read-write").

Tests: editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html

editing/editable-region/float-contenteditable.html
editing/editable-region/hit-test-basic.html
editing/editable-region/hit-test-fixed.html
editing/editable-region/hit-test-overlap.html
editing/editable-region/iframe.html
editing/editable-region/input-basic.html
editing/editable-region/out-hanging-child-of-contenteditable.html
editing/editable-region/overflow-scroll-text-field-and-contenteditable.html
editing/editable-region/relative-inside-fixed-contenteditable-scrolled.html
editing/editable-region/relative-inside-transformed-contenteditable.html
editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables.html

  • Configurations/FeatureDefines.xcconfig: Add feature define to track editable elements on

screen (enabled by default on iOS and iOS Simulator).

  • dom/Document.h:

(WebCore::Document::mayHaveEditableElements const):
(WebCore::Document::setMayHaveEditableElements):
Add some state to each document to track whether it may have an editable element or not. This
value represents a "maybe" because it is only set and never unset. It is set if the style resolver
saw an element with an editable style. This flag is used as a performance optimization to avoid
creating an event region if there are no editable elements on the page.

  • page/Frame.cpp:

(WebCore::Frame::invalidateContentEventRegionsIfNeeded): Check if there are any editable elements.
If so, invalidate the event region.

  • rendering/EventRegion.cpp:

(WebCore::EventRegion::operator== const): Update for editable region.
(WebCore::EventRegion::unite): If the specified style has a writable CSS user-modify value then
unite the region with the editable region.
(WebCore::EventRegion::translate): Update for editable region.
(WebCore::EventRegion::containsEditableElementsInRect const): Added. Check if the specified rect
intersects the editable region. If it does then that means there are one or more editable elements
whose bounds intersect that rect. Otherwise, there are none.
(WebCore::EventRegion::dump const): Update for editable region.

  • rendering/EventRegion.h:

(WebCore::EventRegion::intersects const): Added.
(WebCore::EventRegion::rectsForEditableElements const): Return the rects in the editable region.
(WebCore::EventRegion::encode const): Encode the editable region.
(WebCore::EventRegion::decode): Decode the editable region.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintObject): Traverse descendants if the page has any editable elements
so that we find all of them.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange): Amend the event region invalidation criterion to look
for a change in writability. If there was a change (e.g. read-only to read-write) then invalidate
the event region to force a re-computation of it.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::invalidateEventRegion): If the document has editable elements then we need
to create an event region.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateEventRegion): Update the region if there are editable elements.
(WebCore::RenderLayerBacking::paintDebugOverlays): Paint the editable elements in the debug overlay.
For now, I piggybacked (like was done for touch-action regions) on the non-fast scrollable region
flag (not shown in the patch). I will look to add a dedicated debug overlay flag in a follow up patch.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement): Mark the document as having an editable element if
the style for the element being resolved is writable.

Source/WebCore/PAL:

Add feature define to track editable elements on screen (enabled by default on iOS and iOS Simulator).

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Speed up -_requestTextInputContextsInRect when the rect does not intersect any editable
elements by over 4450 times on reddit.com! Another way of saying this is that it reduces
the time from an average of 303.252ms to 0.0680625ms in a Production build.

This speed up is accomplished by having the web process track the rects of the editable
elements on the page and send this information as a region data structure over to the UI
process as part of the EventRegion object. This region is used to determine if there
*may* be an editable element inside the rectangele. It never reports a false negative,
but it can report a false positive: a rectangle is over an editable element when it
actually isn't, (e.g. there is a non-composited element with a higher z-order than the
editable element that intersects the search rect).

  • Configurations/FeatureDefines.xcconfig: Add feature define to track editable elements on

screen (enabled by default on iOS and iOS Simulator).

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _mayContainEditableElementsInRect:]): Added.
(-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Checks if the search
rects hits an editable element in a RemoteLayerTree node's editable region. If it does
not hit any then we know there are no editable elements and return immediately. If it
does hit something then we still need to ask the web process to perform a hit test to
find the actual elements, respecting z-ordering (which is lost when these elements' rects
are united to form the editable region).

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:

(WebKit::collectDescendantViewsInRect): Added.
(WebKit::mayContainEditableElementsInRect): Added.

Source/WebKitLegacy/mac:

Add feature define to track editable elements on screen (enabled by default on iOS and iOS Simulator).

  • Configurations/FeatureDefines.xcconfig:

Tools:

Add more unit tests for -_requestTextInputContextsInRect. Also add test infrastructure to
be able to verify that WebKit::mayContainEditableElementsInRect() works.

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

(WTR::UIScriptController::mayContainEditableElementsInRect):
Expose an internal function to test WebKit::mayContainEditableElementsInRect().

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Add feature define.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(webViewLoadHTMLStringAndWaitForAllFramesToPaint): Renamed; formerly webViewLoadHTMLStringAndWaitForDOMLoadEvent.
Also make it wait for the next presentation update after we paint.
(TEST):
(squareCenteredAtPoint): Added.
(webViewLoadHTMLStringAndWaitForDOMLoadEvent): Deleted; renamed webViewLoadHTMLStringAndWaitForAllFramesToPaint().

  • TestWebKitAPI/Tests/WebKitCocoa/editable-region-composited-and-non-composited-overlap.html: Added.
  • TestWebKitAPI/ios/editable-region-composited-and-non-composited-overlap.html: Added.
  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::mayContainEditableElementsInRect): Added.

LayoutTests:

Add some tests. Some of these tests were derived from a torture test page written by Simon Fraser.

  • TestExpectations: Skip directory editing/editable-region everywhere. I will unskip this in the iOS TestExpectations file.
  • editing/editable-region/fixed-and-absolute-contenteditable-scrolled-expected.txt: Added.
  • editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html: Added.
  • editing/editable-region/float-contenteditable-expected.txt: Added.
  • editing/editable-region/float-contenteditable.html: Added.
  • editing/editable-region/hit-test-basic-expected.txt: Added.
  • editing/editable-region/hit-test-basic.html: Added.
  • editing/editable-region/hit-test-fixed-expected.txt: Added.
  • editing/editable-region/hit-test-fixed.html: Added.
  • editing/editable-region/hit-test-overlap-expected.txt: Added.
  • editing/editable-region/hit-test-overlap.html: Added.
  • editing/editable-region/iframe-expected.txt: Added.
  • editing/editable-region/iframe.html: Added.
  • editing/editable-region/input-basic-expected.txt: Added.
  • editing/editable-region/input-basic.html: Added.
  • editing/editable-region/out-hanging-child-of-contenteditable-expected.txt: Added.
  • editing/editable-region/out-hanging-child-of-contenteditable.html: Added.
  • editing/editable-region/overflow-scroll-text-field-and-contenteditable-expected.txt: Added.
  • editing/editable-region/overflow-scroll-text-field-and-contenteditable.html: Added.
  • editing/editable-region/relative-inside-fixed-contenteditable-scrolled-expected.txt: Added.
  • editing/editable-region/relative-inside-fixed-contenteditable-scrolled.html: Added.
  • editing/editable-region/relative-inside-transformed-contenteditable-expected.txt: Added.
  • editing/editable-region/relative-inside-transformed-contenteditable.html: Added.
  • editing/editable-region/resources/hit-test-utilities.js: Added.

(async shouldHaveEditableElementsInRect):
(async shouldNotHaveEditableElementsInRect):
(shouldNotHaveEditableElementsInRectForElement):

  • editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables-expected.txt: Added.
  • editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables.html: Added.
  • platform/ios/TestExpectations: Unskip editing/editable-region.
  • resources/ui-helper.js:

(window.UIHelper.mayContainEditableElementsInRect): Added. Convenience function that turns around
and calls the UIScriptController function of the same name and returns a boolean instead of a string.

3:38 PM Changeset in webkit [259761] by dbates@webkit.org
  • 35 edits
    7 adds in trunk

Should find touch-action elements inside non-composited iframes
https://bugs.webkit.org/show_bug.cgi?id=210041
<rdar://problem/61323558>

Reviewed by Simon Fraser.

Source/WebCore:

Fix up event region code to traverse non-composited iframes that have elements with a non-auto
touch-action. The event region is computed for each composited layer during a compositing layer
update and was retricted to being updated if the layer's associated document may have an element
with a non-auto touch-action. To make this work for non-composited iframes I find its enclosing
compositing layer, set a special bit that it needs an event region update because of the non-
composited child iframe and schedule a compositing layer update. When the update happens, it
checks to see if the special bit is set and if so overrides any restrictions that would have
prevented the event region from being updated. The painting code for widgets is also fixed up to
pass through an EventRegionContext to update during EventRegion painting.

This strategy works well for updating the event region. However debug paint overlays are not
updated (i.e. RenderLayerBacking::paintDebugOverlays() is not called) until the embedding client's
view is repainted. For now, to fix this up I added another a hack, a special bit (RenderView::needsRepaintHackAfterCompositingLayerUpdateForDebugOverlaysOnly())
that is only set if debug overlays are to be shown, to have the compositor repaint the view after
updating compositing layers.

Tests: pointerevents/ios/programmatic-touch-action-none-inside-iframe.html

pointerevents/ios/touch-action-none-inside-iframe.html
pointerevents/ios/touch-action-none-inside-nested-iframe.html

  • dom/Document.cpp:

(WebCore::Document::invalidateEventRegionsForFrame): Added. Try to invalidate the event region.
This may fail if the document does not have an enclosing compositing layer for repaint (e.g. nested
composited iframes - see test pointerevents/ios/touch-action-none-inside-nested-iframe.html). If
this happens then recursive on our owner element's document. Recursion is used instead of a loop
to future proof this code for out-of-process (OOP) frames, which will likely introduce document proxy objects.

  • dom/Document.h:
  • page/Frame.cpp:

(WebCore::Frame::invalidateContentEventRegionsIfNeeded): Added. Check if our document has any elements with
a non-auto touch-action. If it does then ask the compositor if the enclosing compositing layer for
repaint's event region must be invalidated - it will only reply true if this is a non-composited iframe.
If it does then forward this invalidation request to the document. The reason I delegate to the document
instead of handling the logic here is to future proof this code for OOP iframes.

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

(WebCore::FrameView::didLayout): Call Frame::invalidateContentEventRegionsIfNeeded(). Also while
I am here take out a ref on the document to ensure it lives through the end of this function, including
through the accessibility's postNotification() code that calls out to the embedding client.

(WebCore::FrameView::paintContents):

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

(WebCore::ScrollView::paint):

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

(WebCore::Scrollbar::paint):

  • platform/Scrollbar.h:
  • platform/Widget.cpp:

(WebCore::Widget::paint):

  • platform/Widget.h:
  • platform/gtk/WidgetGtk.cpp:

(WebCore::Widget::paint):

  • platform/ios/WidgetIOS.mm:

(WebCore::Widget::paint):

  • platform/mac/WidgetMac.mm:

(WebCore::Widget::paint):

  • platform/win/WidgetWin.cpp:

(WebCore::Widget::paint):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintObject):
Pass an EventRegionContext through.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange): Update code now that RendeLayer::invalidateEventRegion()
takes a reason.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paint): Pass the EventRegionContext through. If are passed one then update
paint flags to collect event region.
(WebCore::RenderLayer::invalidateEventRegion): Changed return value from void to bool so as to indicate
to the caller whether the event region was actually invalidated. Also made it take an argument as
to the reason for the invalidation. If invalidation is due to a non-composited iframe then sets some
state and schedule a compositing layer update.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateEventRegion):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):
Pass an EventRegionContext through

(WebCore::RenderLayerCompositor::viewNeedsToInvalidateEventRegionOfEnclosingCompositingLayerForRepaint const): Added.

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

(WebCore::RenderScrollbar::paint):

  • rendering/RenderScrollbar.h:
  • rendering/RenderView.h:

Pass an EventRegionContext through.

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents): Translate the event region by our content paint offset.
(WebCore::RenderWidget::paint): Update for EventRegion. If painting the event region and the view
needs layout then do what we do now and bail out. Otherwise, proceed to paint the widget's content.
The changes to FrameView::didLayout() above means that for non-composited frames that need an event
region update they already performed a layout. So, these paints will be allowed to descend into
painting of the widget's content.

Source/WebKit:

Pass EventRegionContext through. It is unused as it's not applicable for plugin painting.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/Plugins/PluginView.h:

Source/WebKitLegacy/win:

Pass EventRegionContext through. It is unused as it's not applicable for plugin painting.

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paint):

LayoutTests:

Add more tests.

  • pointerevents/ios/programmatic-touch-action-none-inside-iframe-expected.txt: Added.
  • pointerevents/ios/programmatic-touch-action-none-inside-iframe.html: Added.
  • pointerevents/ios/resources/touch-action-none-inside-iframe.html: Added.
  • pointerevents/ios/touch-action-none-inside-iframe-expected.txt: Added.
  • pointerevents/ios/touch-action-none-inside-iframe.html: Added.
  • pointerevents/ios/touch-action-none-inside-nested-iframe-expected.txt: Added.
  • pointerevents/ios/touch-action-none-inside-nested-iframe.html: Added.
3:15 PM Changeset in webkit [259760] by beidson@apple.com
  • 3 edits in trunk/Source/WebKit

Fix handling non-linearized PDFs when incremental PDF loading is enabled.
<rdar://problem/60619506> and https://bugs.webkit.org/show_bug.cgi?id=210208

Reviewed by Tim Horton (and I think Geoff Garen, probably. It's confusing.)

When we try to load a non-linearized PDF with PDFKit, it makes an outlandishly large range request
to try to verify the PDF file size.

That's covered by <rdar://problem/61473378>

Meanwhile we need to detect that and fallback to non-incremental PDF loading.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::receivedInvalidRangeRequest):
(WebKit::dataProviderGetBytesAtPositionCallback):
(WebKit::PDFPlugin::threadEntry):
(WebKit::PDFPlugin::installPDFDocument):

3:06 PM Changeset in webkit [259759] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, unskip http/tests/notifications/event-listener-crash.html

This test should no longer be crashing after r258613.

  • platform/mac-wk1/TestExpectations:
2:50 PM Changeset in webkit [259758] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Allow use of syscall from the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=209920

Reviewed by Geoffrey Garen.

Add syscall to the WebContent sandbox on macOS.

  • WebProcess/com.apple.WebProcess.sb.in:
2:41 PM Changeset in webkit [259757] by Russell Epstein
  • 8 edits in branches/safari-610.1.9-branch

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

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

Reviewed by Brent Fulgham.

Source/WebKit:

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

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

Tools:

Clean up test settings between tests.

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

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

2:41 PM Changeset in webkit [259756] by Russell Epstein
  • 8 edits in branches/safari-610.1.9-branch

Revert r259655. rdar://problem/61360282

2:06 PM Changeset in webkit [259755] by stephan.szabo@sony.com
  • 2 edits in trunk

[PlayStation] Update import of libdl stubs for new Angle dladdr use
https://bugs.webkit.org/show_bug.cgi?id=210200

Reviewed by Don Olmstead.

  • Source/cmake/OptionsPlayStation.cmake:

Use find_package to get libdl wrappers on playstation, include
them in both executables and shared libraries.

1:54 PM Changeset in webkit [259754] by Adrian Perez de Castro
  • 4 edits in trunk/Source

[GTK4] Make PAL::systemBeep() work
https://bugs.webkit.org/show_bug.cgi?id=210158

Reviewed by Carlos Garcia Campos.

Source/WebCore/PAL:

  • pal/system/gtk/SoundGtk.cpp:

(PAL::systemBeep): Use gdk_display_beep(), which works both with GTK3 and GTK4.

Source/WTF:

  • wtf/Platform.h: Define a value for GDK_VERSION_MIN_REQUIRED suitable for GTK4.
1:15 PM Changeset in webkit [259753] by pvollan@apple.com
  • 6 edits in trunk

[macOS] Crash under WebKit::SandboxExtension::consume
https://bugs.webkit.org/show_bug.cgi?id=210188

Reviewed by Geoffrey Garen.

Source/WebKit:

When issuing a mach lookup extension to the database mapping service in the UI process fails, the WebContent
process will crash when trying to consume the extension.

No new tests, since I am not able to reproduce the issue.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
1:14 PM Changeset in webkit [259752] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Make more use of FrameLoader pageID/frameID getters
https://bugs.webkit.org/show_bug.cgi?id=210182

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-08
Reviewed by Chris Dumez.

Make more use of FrameLoader pageID/frameID getters, before
this change they were only used internally in FrameLoader.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::pageID const):
(WebCore::Document::frameID const):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • loader/CookieJar.cpp:

(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::cookieRequestHeaderFieldProxy):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):

  • loader/NavigationAction.cpp:

(WebCore::createGlobalFrameIdentifier):

  • loader/PolicyChecker.cpp:
  • testing/Internals.cpp:

(WebCore::Internals::frameIdentifier const):

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::addParametersShared):

1:06 PM Changeset in webkit [259751] by Doug Kelly
  • 3 edits in trunk/Source/WebCore

Additional cleanup from "Hit test with clipPath referencing parent element causes infinite recursion"
https://bugs.webkit.org/show_bug.cgi?id=210203
<rdar://problem/60002347>

Reviewed by Geoffrey Garen.

As suggested from the review in bug #209773, this incorporates some additional cleanup, including making the
SVGHitTestCycleDetectionScope constructor explicit, and clarifying the add/remove with the WeakHashSet, since
WeakPtr's operator* returns a reference to the template type (which is what we need).

No new tests as this is covered by existing tests and there are no functional changes.

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):

  • rendering/svg/SVGRenderSupport.h:
1:05 PM Changeset in webkit [259750] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Follow-up: [iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or empty mimeType parameter
<https://webkit.org/b/209994>
<rdar://problem/60068700>

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::didCommitLoadForMainFrame):

  • Remove UNUSED_PARAM() in lieu of deleting parameter names.
1:05 PM Changeset in webkit [259749] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[macOS debug] Layout Test imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=187911

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:02 PM Changeset in webkit [259748] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Search: populate the search field with the current selection when using the global search shortcut
https://bugs.webkit.org/show_bug.cgi?id=210207

Reviewed by Timothy Hatcher.

Add a setting to control whether the global search (⇧⌘F) should be populated by the current
selection (if it exists), allowing for a quicker flow for "show me everywhere this exists".

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createGeneralSettingsView):

  • UserInterface/Base/Main.js:

(WI._focusSearchField)

  • Localizations/en.lproj/localizedStrings.js:
1:01 PM Changeset in webkit [259747] by ysuzuki@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

[JSC] Threading JSGlobalObject in RegExp::match properly
https://bugs.webkit.org/show_bug.cgi?id=210174

Reviewed by Saam Barati.

We thread JSGlobalObject* properly in RegExp::match instead of accessing VM::topCallFrame, which is too hacky.

  • runtime/RegExp.cpp:

(JSC::RegExp::match):
(JSC::RegExp::matchConcurrently):

  • runtime/RegExp.h:
  • runtime/RegExpGlobalData.h:
  • runtime/RegExpGlobalDataInlines.h:

(JSC::RegExpGlobalData::performMatch):

  • runtime/RegExpInlines.h:

(JSC::RegExp::matchInline):

  • runtime/RegExpMatchesArray.h:

(JSC::createRegExpMatchesArray):

  • runtime/RegExpObjectInlines.h:

(JSC::RegExpObject::matchInline):
(JSC::collectMatches):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncSearchFast):
(JSC::genericSplit):
(JSC::regExpProtoFuncSplitFast):

  • runtime/StringPrototype.cpp:

(JSC::removeUsingRegExpSearch):
(JSC::replaceUsingRegExpSearch):

  • testRegExp.cpp:

(testOneRegExp):
(runFromFiles):

12:59 PM Changeset in webkit [259746] by Wenson Hsieh
  • 3 edits in trunk/Tools

Remove a workaround that allows many API tests to pass on iOS 13.2
https://bugs.webkit.org/show_bug.cgi?id=209709

Reviewed by Megan Gardner.

Removes a workaround added in r256297 to get API tests passing on iOS 13.2. This workaround swizzled
-[NSBundle bundleIdentifier] to return a non-null string, in order to avoid a crash introduced by
<rdar://problem/56301207>. This was subsequently fixed in <rdar://problem/56790195>, which has made its way
into iOS 13.4.

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(+[WKWebView initialize]): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:
12:25 PM Changeset in webkit [259745] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

[macOS] TestWebKitAPI.WKHTTPCookieStore.WithoutProcessPoolDuplicates is failing
https://bugs.webkit.org/show_bug.cgi?id=209992

Reviewed by Geoffrey Garen.

Make sure existing cookies are cleared before test. Otherwise, they will affect test result.

  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:

(clearCookies):
(TEST):

12:16 PM Changeset in webkit [259744] by Devin Rousso
  • 16 edits
    10 adds in trunk

Web Inspector: Storage: cannot clear out multiple or all local storage entries
https://bugs.webkit.org/show_bug.cgi?id=209867

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/DOMStorage.json:

Add a clearDOMStorageItems command instead of calling removeDOMStorageItem for each key.

Source/WebCore:

Tests: inspector/storage/clearDOMStorageItems.html

inspector/storage/getDOMStorageItems.html
inspector/storage/removeDOMStorageItem.html
inspector/storage/setDOMStorageItem.html

  • inspector/agents/InspectorDOMStorageAgent.h:
  • inspector/agents/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::clearDOMStorageItems): Added.
Add a clearDOMStorageItems command instead of calling removeDOMStorageItem for each key.

Source/WebInspectorUI:

  • UserInterface/Models/DOMStorageObject.js:

(WI.DOMStorageObject.prototype.removeItem):
(WI.DOMStorageObject.prototype.setItem):
(WI.DOMStorageObject.prototype.clear): Added.
(WI.DOMStorageObject.prototype.itemsCleared):
(WI.DOMStorageObject.prototype.itemRemoved):
(WI.DOMStorageObject.prototype.itemAdded):
(WI.DOMStorageObject.prototype.itemUpdated):
Add some assertions.

  • UserInterface/Views/DOMStorageContentView.js:

(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype.get navigationItems):
(WI.DOMStorageContentView.prototype._handleClearNavigationItemClicked): Added.
Add a "Clear" navigation item that calls the new DOMStorage.clearDOMStorageItems.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid.prototype.removeChild):
If the removed item was selected, select the next (or previous if there is no next) item.

  • UserInterface/Views/CookieStorageContentView.js:

(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype._handleClearNavigationItemClicked): Added.
Drive-by: also add a "Clear" navigation item that calls Page.deleteCookie for each row.

  • UserInterface/Protocol/DOMStorageObserver.js:

(WI.DOMStorageObserver.prototype.domStorageItemUpdated):

  • UserInterface/Controllers/DOMStorageManager.js:

(WI.DOMStorageManager.prototype.itemUpdated):
Drive-by: rename value to newValue to match the protocol.

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/storage/clearDOMStorageItems.html: Added.
  • inspector/storage/clearDOMStorageItems-expected.txt: Added.
  • inspector/storage/domStorage-events.html:
  • inspector/storage/domStorage-events-expected.txt:
  • inspector/storage/getDOMStorageItems.html: Added.
  • inspector/storage/getDOMStorageItems-expected.txt: Added.
  • inspector/storage/removeDOMStorageItem.html: Added.
  • inspector/storage/removeDOMStorageItem-expected.txt: Added.
  • inspector/storage/setDOMStorageItem.html: Added.
  • inspector/storage/setDOMStorageItem-expected.txt: Added.
  • inspector/storage/resources/storage-utilities.js: Added.

(clearStorages):
(TestPage.registerInitializer.InspectorTest.Storage.async logEntries):

12:12 PM Changeset in webkit [259743] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Remove unused WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary and WebProcessPool::sendToOneProcess
https://bugs.webkit.org/show_bug.cgi?id=210199

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-04-08
Reviewed by Alex Christensen.

Remove unused functions.

  • UIProcess/WebProcessPool.h:

(WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary): Deleted.
(WebKit::WebProcessPool::sendToOneProcess): Deleted.

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

[JSC] MultiDeleteByOffset should tell correct result AbstractValue in AI
https://bugs.webkit.org/show_bug.cgi?id=210175
<rdar://problem/61433817>

Reviewed by Saam Barati.

JSTests:

  • stress/multi-delete-by-offset-ai-result.js: Added.

(foo):

Source/JavaScriptCore:

Since the result value of MultiDeleteByOffset should be used, AI should set boolean AbstractValue as a result of MultiDeleteByOffset.
We also add MultiDeleteByOffset to DFGStoreBarrierInsertionPhase since it can write StructureID: this means that write-barrier is necessary.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
12:02 PM Changeset in webkit [259741] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._target.NetworkAgent.getResponseBody')
https://bugs.webkit.org/show_bug.cgi?id=210168

Reviewed by Timothy Hatcher.

If a script is loaded by the main page and a Worker, the WI.Script from the Worker
will be associated with the WI.Resource from the main page, the call stack in the Sources
Tab will use the WI.Resource over the WI.Script, but the WI.Target for a Worker does
not have a NetworkAgent or PageAgent. As such, inside WI.Resource, if the _target is
a WI.TargetType.Worker, use the DebuggerAgent.

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.requestContentFromBackend):

  • UserInterface/Main.html:

Drive-by: remove unnecessary <script>.

12:00 PM Changeset in webkit [259740] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: don't reveal the prototype methods when using the "Expand All" context menu item for property-only object trees
https://bugs.webkit.org/show_bug.cgi?id=210123

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ObjectTreeView.css:

(.object-tree.properties-only.json-only .object-tree-property.prototype-property, .object-tree.properties-only.json-only .object-tree-property.prototype-property + .children): Added.
(.object-tree.properties-only.json-only .object-tree-property.prototype-property): Deleted.

11:57 AM Changeset in webkit [259739] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

Web Inspector: only broadcast the console message to main frames
https://bugs.webkit.org/show_bug.cgi?id=210122

Reviewed by Timothy Hatcher.

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::broadcastConsoleMessage):

11:53 AM Changeset in webkit [259738] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: support copying selected call frame(s) in the Call Stack
https://bugs.webkit.org/show_bug.cgi?id=210172

Reviewed by Timothy Hatcher.

  • UserInterface/Views/SourcesTabContentView.js:

(WI.SourcesTabContentView.prototype.handleCopyEvent): Added.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.handleCopyEvent): Added.
Copy the function name and source location for each selected call frame. If the selected
call frames span an async boundary, include the async boundary in the form --- <name> ---
where name is the reason for the async behavior (e.g. addEventListener). If the selected
call frames span multiple threads (e.g. Worker), include the thread name and indent all
of the call frames for that thread.

  • UserInterface/Views/CallFrameTreeElement.js:

(WI.CallFrameTreeElement):
(WI.CallFrameTreeElement.prototype.get isAsyncBoundaryCallFrame): Added.

11:50 AM Changeset in webkit [259737] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

WebContent process crashes in com.apple.WebCore: rx::IOSurfaceSurfaceCGL::releaseTexImage
https://bugs.webkit.org/show_bug.cgi?id=210151

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

Explicitly check for context teardown when displaying a
WebGLLayer.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer display]):

11:50 AM Changeset in webkit [259736] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

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

Unreviewed gardening.

  • platform/gtk/TestExpectations:
11:47 AM Changeset in webkit [259735] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION: [ iOS wk2 Debug ] WTFCrash + 14 (Assertions.cpp:309) - WebCore::Page::recomputeTextAutoSizingInAllFrames()
https://bugs.webkit.org/show_bug.cgi?id=210205

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:23 AM Changeset in webkit [259734] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk/Source

Enable offlineasm debug annotations for GCC
https://bugs.webkit.org/show_bug.cgi?id=207119

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2020-04-08
Reviewed by Darin Adler.

This simply reuses the existing code that generates debug
annotations, adding two workarounds for limitations in GCC and
GDB.

First, the .file directives that offlineasm inserts in inline asm
use file slots that conflict with those in the compilation unit
that includes LLIntAssembly.h (specifically,
LowLevelInterpreter.cpp). Clang's built-in assembler will
transparently fix that for us, but for GCC we need to
post-process the generated assembler.

Unfortunately, cmake doesn't allow us to introduce a compiler wrapper for a
single source file, so we need to create a separate target for it. This
wrapping only happens when building with GCC and the user has explicitly
requested debug information, either by selecting a Debug/RelWithDebInfo build
or setting GCC_OFFLINEASM_SOURCE_MAP.

Second, GDB will only look at the line table for a compilation unit if
it can first resolve the address to one of the known symbols in the
file. Introduce marker symbols to work around this bug.

  • CMakeLists.txt:
11:18 AM Changeset in webkit [259733] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iOS wk2 Debug ] WTFCrash + 14 (Assertions.cpp:309) - WebKit::EditorState::postLayoutData()
https://bugs.webkit.org/show_bug.cgi?id=210201

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:15 AM Changeset in webkit [259732] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[macOS] Make PlatformPasteboard robust against types that cannot be encoded with +defaultCStringEncoding
https://bugs.webkit.org/show_bug.cgi?id=210195
<rdar://problem/61084208>

Reviewed by Tim Horton.

When setting pasteboard data using the three PlatformPasteboard methods below, avoid calling into NSPasteboard
in the case where the pasteboard type fails to be encoded using +[NSString defaultCStringEncoding]. This is
because AppKit pasteboard logic will attempt to convert the given string into a C string using [NSString
defaultCStringEncoding], and then assume that the result is non-null, if the type is neither declared nor
dynamic.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::canWritePasteboardType):
(WebCore::PlatformPasteboard::setTypes):
(WebCore::PlatformPasteboard::setBufferForType):
(WebCore::PlatformPasteboard::setStringForType):

Add early returns if canWritePasteboardType returns false.

11:07 AM Changeset in webkit [259731] by Kate Cheney
  • 8 edits in trunk

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

Reviewed by Brent Fulgham.

Source/WebKit:

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

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

  • UIProcess/WebPageProxy.cpp:

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

  • UIProcess/WebPageProxy.h:

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

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

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

  • UIProcess/API/APIHTTPCookieStore.cpp:

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

Tools:

Clean up test settings between tests.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(cleanUpInAppBrowserPrivacyTestSettings):

10:58 AM Changeset in webkit [259730] by Alan Bujtas
  • 5 edits in trunk/LayoutTests

[Win] Gardening, update baselines

Unreviewed gardening.

Rebaseline after r259296.

  • platform/win/css2.1/20110323/margin-applies-to-006-expected.txt:
  • platform/win/fast/forms/form-hides-table-expected.txt:
  • platform/win/fast/table/table-insert-before-non-anonymous-block-expected.txt:
  • platform/win/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:
10:51 AM Changeset in webkit [259729] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

[iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or empty mimeType parameter
<https://webkit.org/b/209994>
<rdar://problem/60068700>

Reviewed by Chris Dumez.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):

  • Extract logic for representationClass since -[WKWebViewContentProviderRegistry providerForMIMEType:] may return nil.
  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry providerForMIMEType:]):

  • Add early return if mimeType is null or empty as those are not valid keys for _contentProviderForMIMEType.
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::didCommitLoadForMainFrame):

  • Add UNUSED_PARAM() for when -Wno-unused-parameter is removed in place of GCC_WARN_UNUSED_VARIABLE=YES.
10:41 AM Changeset in webkit [259728] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mac wk1 Debug ] two webgl/2.0.0/conformance2/attribs/gl tests are flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=210198

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:30 AM Changeset in webkit [259727] by BJ Burg
  • 2 edits in trunk/Source/WebKit

REGRESSION(r253346): some Automation commands targeted at an iframe do not return
https://bugs.webkit.org/show_bug.cgi?id=210139
<rdar://problem/60561009>

Reviewed by Devin Rousso.

WebAutomationSession / WebAutomationSessionProxy are singletons, and only one
exists at a time in the UIProcess / WebProcess respectively. A recent change was
made to call Connection::sendWithAsyncReply from the WebPageProxy object rather
than WebProcess. The effect of this is that the WebPage's destinationID is
used for the response message rather than the WebProcess.

Because WebAutomationSessionProxy registers itself as a global IPC message receiver,
the page-targeted destinationID cannot find any receivers for the message at the
destinationID, which causes an ASSERT in debug builds and a hang in non-debug builds.

The fix is to continue sending messages via the WebProcess object, whose messages
are tagged with a destinationID of 0 (eg, global message receiver). This could alternatively
be accomplished by passing a destinationID of 0 to every sendWithAsyncReply, but
as is this change is a straightforward partial revert of r253346.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::selectOptionElement):
(WebKit::WebAutomationSession::setFilesForInputFileUpload):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::takeScreenshot):

10:25 AM Changeset in webkit [259726] by Truitt Savell
  • 25 edits in trunk

Unreviewed, reverting r259708.

Broke the iOS device Build

Reverted changeset:

"Enable the use of XCBuild by default in Apple builds"
https://bugs.webkit.org/show_bug.cgi?id=209890
https://trac.webkit.org/changeset/259708

10:21 AM Changeset in webkit [259725] by commit-queue@webkit.org
  • 5 edits in trunk

Import fetch/origin/assorted.window.js
https://bugs.webkit.org/show_bug.cgi?id=210128

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-08
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Import fetch/origin/assorted.window.js after
https://github.com/web-platform-tests/wpt/pull/22567.

  • web-platform-tests/fetch/origin/assorted.window-expected.txt:
  • web-platform-tests/fetch/origin/assorted.window.js:

(async const):
(fetchReferrerPolicy):
(referrerPolicyTestString):

Source/WebCore:

Import fetch/origin/assorted.window.js and remove
the hack to make the previous (incorrect) version work.

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders):

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

Ref WebProcessProxy in NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses()
https://bugs.webkit.org/show_bug.cgi?id=210196

Reviewed by Youenn Fablet.

Ref WebProcessProxy in NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses()
since the call to WebProcessProxy::disableServiceWorkers() may cause it to get destroyed
otherwise.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses):

10:07 AM Changeset in webkit [259723] by Jacob Uphoff
  • 3 edits in trunk/LayoutTests

Flaky Test: media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html
https://bugs.webkit.org/show_bug.cgi?id=182571

Updated expectations to include wk2

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:00 AM Changeset in webkit [259722] by Doug Kelly
  • 10 edits
    4 adds in trunk

Hit test with clipPath referencing parent element causes infinite recursion
https://bugs.webkit.org/show_bug.cgi?id=209773
<rdar://problem/60002347>

Reviewed by Geoffrey Garen.

Source/WebCore:

Upon further investigation, the original fix for the hit test in RenderSVGResourceClipper to prevent
infinite recursion was incomplete, as something such as a use element could easily cause another cycle which
would not be detected by the initial fix. Instead, by maintaining a set of visited elements, we can prevent
visiting the same element twice, and thus breaking any cycles which might occur in the SVG document. We
track these elements within the SVGHitTestCycleDetectionScope class, where the set of visited elements are
maintained statically, and instances of the class will manage the scope, as an RAII-style object.

This is covered by an existing test, but includes additional test cases which illustrate the more complex
document structure.

Tests: svg/hittest/svg-clip-path-child-element-with-use-root.html

svg/hittest/svg-clip-path-child-element-with-use.html

  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::nodeAtFloatPoint):

  • rendering/svg/RenderSVGImage.cpp:

(WebCore::RenderSVGImage::nodeAtFloatPoint):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::hitTestClipContent):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::nodeAtPoint):

  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::nodeAtFloatPoint):

  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::nodeAtFloatPoint):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::pointInClippingArea):
(WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::visitedElements):
(WebCore::SVGHitTestCycleDetectionScope::isEmpty):
(WebCore::SVGHitTestCycleDetectionScope::isVisiting):

  • rendering/svg/SVGRenderSupport.h:

LayoutTests:

  • svg/hittest/svg-clip-path-child-element-with-use-expected.txt: Added.
  • svg/hittest/svg-clip-path-child-element-with-use-root-expected.txt: Added.
  • svg/hittest/svg-clip-path-child-element-with-use-root.html: Added.
  • svg/hittest/svg-clip-path-child-element-with-use.html: Added.
10:00 AM Changeset in webkit [259721] by dbates@webkit.org
  • 2 edits in trunk/Tools

[lldb-webkit] Pretty-print NSEventModifierFlags
https://bugs.webkit.org/show_bug.cgi?id=210193

Reviewed by Jer Noble.

Enumerations such as NSEventModifierFlags describe disjoint sets of flags. In the case of
NSEventModifierFlags it describes both device independent and dependent flags. When pretty
printing such types one or more sets of flags may not be publically available. So, add
support masking off such inaccessible sets of flags before pretty printing the rest of
the set.

  • lldb/lldb_webkit.py:

(addSummaryAndSyntheticFormattersForRawBitmaskType):
(addSummaryAndSyntheticFormattersForRawBitmaskType.GeneratedRawBitmaskProvider):
(lldb_init_module):
(RawBitmaskProviderBase):
(RawBitmaskProviderBase._bitmask):

9:31 AM Changeset in webkit [259720] by graouts@webkit.org
  • 14 edits
    2 adds in trunk

transition-property is not computed correctly when transition-duration is set to "inherit"
https://bugs.webkit.org/show_bug.cgi?id=204554
<rdar://problem/57458091>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Somehow this test progressed slightly, it now fails in the second assertion rather than the first, although it fails still overall.

  • web-platform-tests/css/css-transitions/events-004-expected.txt:

Source/WebCore:

Test: transitions/transition-property-for-element-with-transition-duration-inherit.html

The "transition-property" would behave as if "inherit" was set when the "transition-duration" property itself was set explicitly to "inherit".
We fix this by storing all the information contained in the "transition-property" into the single Animation::m_property member instead of splitting
it across Animation::m_mode as well. We now use a TransitionProperty struct which holds both the transition "mode" (none, all, single property,
unknown property) and and the CSS property targeted itself.

This requires modifying call sites of both Animation::property() and Animation::animationMode() throughout WebCore.

  • animation/AnimationTimeline.cpp:

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

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createTransitionPropertyValue):

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationProperty):

  • css/makeprop.pl:

(generateAnimationPropertyInitialValueSetter):
(generateAnimationPropertyInheritValueSetter):

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::ImplicitAnimation):

  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::didAddTransition):

  • platform/animation/Animation.cpp:

(WebCore::Animation::Animation):
(WebCore::Animation::operator=):
(WebCore::Animation::animationsMatch const):
(WebCore::operator<<):

  • platform/animation/Animation.h:

(WebCore::Animation::property const):
(WebCore::Animation::timingFunction const):
(WebCore::Animation::setProperty):
(WebCore::Animation::setTimingFunction):
(WebCore::Animation::initialProperty):
(WebCore::Animation::animationMode const): Deleted.
(WebCore::Animation::setAnimationMode): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::adjustTransitions):
(WebCore::RenderStyle::transitionForProperty const):

LayoutTests:

Add a new test that checks that setting "transition-duration" to "inherit" does not cause "transition-property" to behaves
as if "inherit" was implictly set as well.

  • transitions/transition-property-for-element-with-transition-duration-inherit-expected.txt: Added.
  • transitions/transition-property-for-element-with-transition-duration-inherit.html: Added.
9:17 AM Changeset in webkit [259719] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Improve summary for CheckPatchRelevance build step (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=210146

Unreviewed follow-up fix.

Revert the failure message for CheckPatchRelevance to old one since it needs to match with status-bubble code.

  • BuildSlaveSupport/ews-build/steps.py:
  • BuildSlaveSupport/ews-build/steps_unittest.py:

(TestCheckPatchRelevance.test_non_relevant_patch):

8:41 AM Changeset in webkit [259718] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

EWS should skip mac-wk1 and mac-debug-wk1 tests for patches that only change WebKit2 sources
https://bugs.webkit.org/show_bug.cgi?id=210115

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/factories.py:

(macOSWK1Factory.init): Set checkRelevance to True for mac wk1 queue.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckPatchRelevance): Added relevance info for wk1 queues.

  • BuildSlaveSupport/ews-build/factories_unittest.py: Updated unit-tests.

(TestLayoutTestsFactory.test_macos_wk1_release_factory):
(TestLayoutTestsFactory.test_macos_wk1_debug_factory):

  • BuildSlaveSupport/ews-build/steps_unittest.py:

(TestCheckPatchRelevance.test_relevant_jsc_patch):
(TestCheckPatchRelevance.test_relevant_wk1_patch):
(TestCheckPatchRelevance.test_queues_without_relevance_info):
(TestCheckPatchRelevance.test_non_relevant_patch):

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

Regression(r259610) [RBSTarget targetWithPid:] may throw a 'must specify a valid pid' exception
https://bugs.webkit.org/show_bug.cgi?id=210159

Reviewed by Alex Christensen.

[RBSTarget targetWithPid:] may throw a 'must specify a valid pid' exception since r259610. There
are apparently cases where the PID we are passing the ProcessAssertion is 0 (likely process crash
on startup). BKSAssertion used to deal with this silently but RBSAssertion actually throws an
exception in this case. To maintain the old behavior, we should do an explicit check to make sure
the PID is valid before passing it to RunningBoard.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):

8:03 AM Changeset in webkit [259716] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Handle errors when grabbing grabbing microphone audio samples from the AudioUnit
https://bugs.webkit.org/show_bug.cgi?id=210185

Reviewed by Eric Carlson.

We compute the buffer size to copy microphone samples when setting up the Audio Unit.
This is based on the preferred buffer size and sample rate.
But these values might change over time by the web page durig the capture.
If the preferred buffer size increases (for instance if the page stops using WebAudio), our buffer might be too small.
Capture will fail but we will not notify the web application.

Update the code to reconfigure the AudioUnit if AudioUnitRender returns an error of type kAudio_ParamError.
Update the code to only increment the number of microphoneProcsCalled if AudioUnitRender succeeds.
This will ensure that, should AudioUnitRender fails for some time, the timer will kick in and fail the capture.
Page will be notified and can call getUserMedia again to restart capture.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::processMicrophoneSamples):

7:32 AM Changeset in webkit [259715] by guijemont@igalia.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC][32-bits] Build failure after r259676 (Not using strict mode within ClassDeclaration statement)
https://bugs.webkit.org/show_bug.cgi?id=210176

Reviewed by Aakash Jain.

Fixed 32-bit paths to match changes in r259676.

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEval):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_by_id):

7:20 AM Changeset in webkit [259714] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, flaky failures in EWS GTK-WK2
https://bugs.webkit.org/show_bug.cgi?id=210187

Unreviewed gardening.

  • platform/gtk/TestExpectations:
5:25 AM Changeset in webkit [259713] by Claudio Saavedra
  • 6 edits in trunk

[GTK] Drop usage of deprecated GdkDeviceManager
https://bugs.webkit.org/show_bug.cgi?id=210179

Reviewed by Adrian Perez de Castro.

Replace GdkDeviceManager usage for GdkSeat.
For GTK4 further changes will be needed but this is a
start.

Source/WebKit:

  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::createScrollEvent):

Tools:

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

(WebViewTest::mouseMoveTo):
(WebViewTest::keyStroke):
(WebViewTest::doMouseButtonEvent):

  • TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:

(TestWebKitAPI::doKeyStroke):
(TestWebKitAPI::doMouseButtonEvent):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::EventSenderProxy::createMouseButtonEvent):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::continuousMouseScrollBy):
(WTR::EventSenderProxy::createTouchEvent):

3:29 AM Changeset in webkit [259712] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Ensure base cache path exists before calculating disk cache capacity
https://bugs.webkit.org/show_bug.cgi?id=209338

Reviewed by Adrian Perez de Castro.

The base cache path might not exist yet in Cache::open() since it's Storage::open() the one calling
FileSystem::makeAllDirectories() with the final cache directory. In such case, computeCapacity() fails because
FileSystem::getVolumeFreeSpace() needs an existing file.

  • NetworkProcess/cache/NetworkCache.cpp:

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

2:38 AM Changeset in webkit [259711] by timothy_horton@apple.com
  • 8 edits in trunk/Source

Rearrange and simplify some JSC feature flags
https://bugs.webkit.org/show_bug.cgi?id=210152

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:

(Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):

  • jit/ExecutableAllocator.cpp:

(JSC::isJITEnabled):
(JSC::ExecutableAllocator::setJITEnabled):

  • runtime/Options.cpp:

(JSC::overrideDefaults):

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
  • wtf/PlatformUse.h:
2:28 AM Changeset in webkit [259710] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK gardening. Update expectations after r259705

Remove expectations of tests that are passing after r259705.

  • platform/gtk/TestExpectations:
2:24 AM Changeset in webkit [259709] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK gardening. Update expectations after r259705

Remove expectations of tests that are passing after r259705.

  • platform/gtk/TestExpectations:
2:12 AM Changeset in webkit [259708] by Keith Rollin
  • 25 edits in trunk

Enable the use of XCBuild by default in Apple builds
https://bugs.webkit.org/show_bug.cgi?id=209890
<rdar://problem/44182078>

Reviewed by Darin Adler.

Switch from the "legacy" Xcode build system to the "new" build system
(also known as "XCBuild"). Switching to the new system speeds up
builds by a small percentage, better validates projects for
build-related issues (such as dependency cycles), lets WebKit benefit
from future improvements in XCBuild such as those coming from the
underlying llbuild open source project, and prepares us for any other
tools built for this new ecosystem.

Specific changes:

  • Remove Xcode project and workspace settings that selected the Build system, allowing the default to take hold (which is currently the New build system).
  • Updated webkitdirs.pm with a terser check for Xcode version.
  • Update build-webkit and Makefile.shared to be explicit when using the old build system (no longer treat it as a default or fall-back configuration).
  • Update various xcconfig files similarly to treat the default as using the new build system.
  • Update various post-processing build steps to check for Xcode 11.4 and to no longer treat the default as using the old build system.

.:

  • Makefile.shared:
  • WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:

Source/JavaScriptCore:

  • Configurations/JavaScriptCore.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty/ANGLE:

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE.xcconfig:

Source/ThirdParty/libwebrtc:

  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

No new tests -- no changed functionality.

  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

  • Configurations/WebKit.xcconfig:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:

Tools:

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • Scripts/build-webkit:
  • Scripts/webkitdirs.pm:

(canUseXCBuild):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
1:40 AM Changeset in webkit [259707] by Philippe Normand
  • 8 edits in trunk

[GTK][WPE] Release logs are unconditionally filling the journal
https://bugs.webkit.org/show_bug.cgi?id=209421

Reviewed by Carlos Alberto Lopez Perez.

.:

Re-enable Systemd logging and make it opt-in via the WEBKIT_DEBUG environment variable.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • platform/unix/LoggingUnix.cpp:

(WebCore::logLevelString): Disable all logging when the
WEBKIT_DEBUG environment variable is empty.

Source/WTF:

  • wtf/Assertions.h: Don't send logs to systemd for disabled log channels.
  • wtf/Logger.h:

(WTF::Logger::willLog const): Ditto.

12:46 AM Changeset in webkit [259706] by graouts@webkit.org
  • 3 edits in trunk/Source/WebCore

[iPadOS] Unable to toggle subpages on sites.google.com
https://bugs.webkit.org/show_bug.cgi?id=210143
<rdar://problem/58653069>

Reviewed by Brent Fulgham.

If a site built with sites.google.com has some sub-pages, tapping on the right-pointing arrow will not disclose the sub-pages due to preventDefault() being called
on the touchend event handler. We work around this issue by adding a new quirk that will prevent a given touch event type from being dispatched on a given element.
This quirk is only true for sites.google.com and the right-pointing arrow for the sub-pages disclosure.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):

  • page/Quirks.h:

Apr 7, 2020:

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

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

Reviewed by Adrian Perez de Castro.

Source/WebKit:

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

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetPrimaryWebsiteDataStore):

  • UIProcess/API/C/WKContextPrivate.h:

Tools:

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

  • WebKitTestRunner/TestController.cpp:

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

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

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

Reviewed by Darin Adler.

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

  • TestWebKitAPI/Tests/WTF/MathExtras.cpp:

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

  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp:

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

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

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

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

LayoutTests/imported/w3c:

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

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

Source/WebCore:

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

  • css/CSSCalculationValue.cpp:

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

  • css/CSSGradientValue.cpp:

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

  • css/CSSPrimitiveValue.cpp:

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

  • css/CSSPrimitiveValue.h:

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

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):

  • css/CSSToLengthConversionData.cpp:

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

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

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

  • css/CSSUnits.cpp:

(WebCore::operator<<):

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

(WebCore::MediaQueryEvaluator::evaluate const):

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLength):

  • css/parser/SizesAttributeParser.cpp:

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

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerElement::resolveCustomStyle):

  • rendering/RenderElement.h:

(WebCore::RenderElement::parentStyle const):

  • rendering/RenderThemeIOS.mm:

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

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

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

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

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

  • style/StyleBuilderCustom.h:

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

  • style/StyleBuilderState.cpp:

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

LayoutTests:

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

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

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

Unreviewed test gardening.

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

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

Reviewed by Simon Fraser.

Source/WebCore:

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

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

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::calculateFillTileSize const):

LayoutTests:

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

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

Reviewed by Chris Dumez.

Source/WebKit:

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

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

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

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

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

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeConnection):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

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

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

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/factories_unittest.py:

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

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

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

No new tests, no new behaviors.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setInterrupted):

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

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

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

Reviewed by Brent Fulgham.

Source/WebKit:

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

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

Tools:

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

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

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

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

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

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

Reviewed by Brady Eidson.

Source/WebCore:

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

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

Tools:

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

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

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

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

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

Reviewed by Brent Fulgham.

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

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

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

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

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

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

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

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

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

Reviewed by Brent Fulgham.

No new tests. Just a change of logging.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

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

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

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

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):

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

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

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

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

Reviewed by Youenn Fablet.

Source/WebCore:

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

Source/WebCore/PAL:

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

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

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

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

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

Reviewed by Eric Carlson.

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

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

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

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

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

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

Reviewed by Eric Carlson.

Source/WebCore:

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

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

Source/WebKit:

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

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

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

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

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

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

Reviewed by Geoffrey Garen.

Source/WebCore:

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

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

Source/WebKit:

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

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

Source/WTF:

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

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

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

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

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

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

No new tests, no new behavior changes.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

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

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

Reviewed by Joanmarie Diggs.

Source/WebCore:

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

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

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press):

  • dom/Element.h:

(WebCore::Element::accessKeyAction):

  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::accessKeyAction):

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

(WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction):

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

(WebCore::BaseClickableWithKeyInputType::accessKeyAction):

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

(WebCore::HTMLAnchorElement::accessKeyAction):

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

(WebCore::HTMLButtonElement::accessKeyAction):

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

(WebCore::HTMLElement::accessKeyAction):

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

(WebCore::HTMLInputElement::accessKeyAction):

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

(WebCore::HTMLLabelElement::accessKeyAction):

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

(WebCore::HTMLLegendElement::accessKeyAction):

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

(WebCore::HTMLOptGroupElement::accessKeyAction):

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

(WebCore::HTMLOptionElement::accessKeyAction):

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

(WebCore::HTMLSelectElement::accessKeyAction):

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

(WebCore::HTMLTextAreaElement::accessKeyAction):

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

(WebCore::HiddenInputType::accessKeyAction):

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

(WebCore::InputType::accessKeyAction):

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

(WebCore::RangeInputType::accessKeyAction):

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

(WebCore::SVGElement::accessKeyAction):

  • svg/SVGElement.h:

LayoutTests:

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

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

Unreviewed test gardening.

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

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

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

Reviewed by Alex Christensen.

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

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

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

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

Unreviewed test gardening.

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

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

Reviewed by Saam Barati.

JSTests:

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

(let.theCode):

Source/JavaScriptCore:

Collect-Continuously thread has fancy race issue.

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

while (!m_shouldStopCollectingContinuously) {

{ (A)

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

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

}

}

{

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

m_collectContinuouslyCondition.waitUntil(m_collectContinuouslyLock, timeToWakeUp);

}

}

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

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

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

  • heap/Heap.cpp:

(JSC::Heap::notifyIsSafeToCollect):

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

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

Unreviewed test gardening.

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

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

Reviewed by Tadeu Zagallo.

JSTests:

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

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

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

(assert):
(foo):

Source/JavaScriptCore:

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

  • jit/Repatch.cpp:

(JSC::tryCacheDeleteBy):

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

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

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by new tests within existing test files.

  • testing/MockWebAuthenticationConfiguration.h:

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

  • testing/MockWebAuthenticationConfiguration.idl:

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

Source/WebKit:

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

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

(WebKit::AuthenticatorManager::cancelRequest):

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

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

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

(WebKit::LocalConnection::verifyUser const):

  • UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:

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

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Modifies existing tests to accommodate changes in MockWebAuthenticationConfiguration.idl.

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

LayoutTests:

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

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

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

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

This direcotry is used for cookie storage.

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

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

Unreviewed test gardening.

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

Unreviewed build fix, rdar://problem/61352465

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

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

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

Reviewed by Yusuke Suzuki.

JSTests:

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

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

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

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

Source/JavaScriptCore:

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

  • API/APICallbackFunction.h:

(JSC::APICallbackFunction::call):

  • API/JSCallbackObjectFunctions.h:

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

  • API/JSContextRef.cpp:

(JSContextGetGlobalObject):

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

(JSC::BytecodeGeneratorification::run):

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

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

  • bytecode/CodeBlock.h:

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

  • bytecode/ExecutableInfo.h:

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

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

(JSC::InlineCallFrame::dumpInContext const):

  • bytecode/InlineCallFrame.h:

(JSC::InlineCallFrame::isInStrictContext const):

  • bytecode/PutByIdFlags.cpp:

(WTF::printInternal):

  • bytecode/PutByIdFlags.h:

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

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::isConstructor const):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::needsClassFieldInitializer const):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::generateUnlinkedFunctionCodeBlock):

  • bytecompiler/BytecodeGenerator.cpp:

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

  • bytecompiler/BytecodeGenerator.h:

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

  • bytecompiler/NodesCodegen.cpp:

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

  • debugger/DebuggerCallFrame.cpp:

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

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.h:

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

  • dfg/DFGNode.h:

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

  • dfg/DFGOpInfo.h:

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

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

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

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

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

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

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

  • ftl/FTLLowerDFGToB3.cpp:

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

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::internalConstructorName):

  • interpreter/Interpreter.cpp:

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

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

(JSC::JIT::compileCallEval):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITPutByIdGenerator::slowPathFunction):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITPutByIdGenerator::JITPutByIdGenerator):

  • jit/JITInlines.h:

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

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

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

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_put_by_val):

  • jit/Repatch.cpp:

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

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

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

  • runtime/ArrayPrototype.cpp:

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

  • runtime/CachedTypes.cpp:

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

  • runtime/ClonedArguments.cpp:

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

  • runtime/CodeCache.cpp:

(JSC::generateUnlinkedCodeBlockImpl):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPathsInlines.h:

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

  • runtime/Completion.cpp:

(JSC::evaluate):

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

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

(JSC::ECMAMode::dump const):

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

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

  • runtime/EvalExecutable.h:

(JSC::EvalExecutable::executableInfo const):

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

(JSC::GetPutInfo::dump const):

  • runtime/GetPutInfo.h:

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

  • runtime/GetterSetter.cpp:

(JSC::callSetter):

  • runtime/IndirectEvalExecutable.cpp:

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

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

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

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

(JSC::JSCell::toThis):

  • runtime/JSFunction.cpp:

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

  • runtime/JSGlobalObjectFunctions.cpp:

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

  • runtime/JSObject.cpp:

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

  • runtime/JSScope.cpp:

(JSC::JSScope::toThis):

  • runtime/JSString.cpp:

(JSC::JSString::toThis):

  • runtime/LiteralParser.cpp:

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

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

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

  • runtime/ObjectPrototype.cpp:

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

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

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

(JSC::performProxyCall):

  • runtime/ScriptExecutable.h:

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

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayEntry::put):

Source/WebCore:

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

  • bindings/js/JSDOMWindowCustom.cpp:

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

  • bindings/js/JSEventTargetCustom.h:

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

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

LayoutTests:

Fix the test since it contained incorrect code.

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

Unreviewed, reverting r259655.

Caused assertion failures and timeouts on iOS bots

Reverted changeset:

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

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

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

Reviewed by Alex Christensen.

Source/WebKit:

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

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

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

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

(WebKit::WebProcess::initializeConnection):

  • WebProcess/WebProcess.h:

Source/WTF:

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

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

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

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

To fix this issue we do three things:

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

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

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

  • UIProcess/GPU/GPUProcessProxy.cpp:

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

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

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

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

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

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

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

  • WebProcess/Network/NetworkProcessConnectionInfo.h:

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

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

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

Reviewed by Tim Horton.
Source/WebCore:

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

  • page/scrolling/ScrollingTree.cpp:

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

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

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

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

(WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinAndRubberbandState):

Source/WebKit:

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

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

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

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

Reviewed by Chris Fleizach.

Source/WebCore:

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

Changed mappings

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

Updated existing tests to reflect this change.

  • accessibility/atk/WebKitAccessible.cpp:

(atkRole):

Tools:

Add support for ATK_ROLE_NOTIFICATION.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

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

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

Reviewed by Carlos Alberto Lopez Perez.

Avoid potential surroundingRange dereference segfault.

  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::getPlatformEditorState const):

2:00 PM Changeset in webkit [259669] by Wenson Hsieh
  • 12 edits
    2 adds in trunk

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

Reviewed by Tim Horton.

Source/WebKit:

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

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

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Tools:

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

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

(WTR::UIScriptController::installTapGestureOnWindow):

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

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

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

(WTR::UIScriptControllerIOS::installTapGestureOnWindow):

LayoutTests:

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

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

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

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

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

Reviewed by Ross Kirsling.

JSTests:

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

Tools:

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

  • Scripts/test262/Runner.pm:

(runTest):

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

Unreviewed, reverting r259446.

Broke Windows testing

Reverted changeset:

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

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

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

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ScopeBar.css:

(.scope-bar):

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

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

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

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

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

Apply patch. rdar://problem/61231957

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

Apply patch. rdar://problem/61231889

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

Apply patch. rdar://problem/61231881

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

Apply patch. rdar://problem/61404555

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

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

Reviewed by Jonathan Bedard.

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

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

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

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

Reviewed by Darin Adler.

Enable modern for-loops.

  • animation/AnimationTimeline.cpp:

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

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::updateStyleIfNeededForProperty):

  • css/StyleProperties.cpp:

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

  • css/StylePropertyShorthand.h:

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

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::addExpandedPropertyForValue):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

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

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

Reviewed by Yusuke Suzuki.

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

Remove skips.

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

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

Unreviewed test gardening.

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

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

unreviewed test gardening.

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

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

Reviewed by Brent Fulgham.

Source/WebKit:

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

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

  • UIProcess/WebPageProxy.cpp:

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

  • UIProcess/WebPageProxy.h:

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

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

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

  • UIProcess/API/APIHTTPCookieStore.cpp:

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

Tools:

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

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

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

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

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

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

Reviewed by Saam Barati.

JSTests:

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

Source/JavaScriptCore:

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

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

We set (new C).x

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

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

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

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

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

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

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

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

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

Reviewed by Mark Lam.

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

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

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

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

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

Reviewed by Yusuke Suzuki.

PerformanceTests:

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

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

each subtest run.

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

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

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

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

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

when the vmmap finishes running.

  • JetStream2/RAMification.py:

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

Source/bmalloc:

  • bmalloc/Scavenger.cpp:

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

  • bmalloc/Scavenger.h:

(bmalloc::Scavenger::disable):

  • bmalloc/bmalloc.cpp:

(bmalloc::api::disableScavenger):

  • bmalloc/bmalloc.h:

Source/JavaScriptCore:

  • jsc.cpp:

(main):

Source/WTF:

  • wtf/FastMalloc.cpp:

(WTF::fastDisableScavenger):

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

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

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Import test coverage from upstream WPT.

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

Source/WebCore:

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

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

  • dom/DocumentFragment.cpp:

(WebCore::DocumentFragment::getElementById const):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::getElementById const):

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

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

Reviewed by Brady Eidson.

Source/WebCore:

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

  • page/Page.cpp:

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

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

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

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

Reviewed by Timothy Hatcher.

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

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

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::getCookies):

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

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

Reviewed by Brent Fulgham.

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

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

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

Reviewed by Wenson Hsieh.

Source/WebCore:

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

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::replace):

Tools:

Added regression tests.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

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

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

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

Reviewed by Mark Lam.

JSTests:

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

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

Source/JavaScriptCore:

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

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • runtime/CachedTypes.cpp:

(JSC::CachedScopedArgumentsTable::decode const):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::unmapArgument):

  • runtime/ScopedArgumentsTable.cpp:

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

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

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

Reviewed by Mark Lam.

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

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

  • dfg/DFGSpeculativeJIT.cpp:

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

  • dfg/DFGSpeculativeJIT.h:

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

  • ftl/FTLAbstractHeapRepository.cpp:

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

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

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

  • jit/AssemblyHelpers.h:

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

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

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

  • runtime/JSWrapperObject.cpp:

(JSC::JSWrapperObject::visitChildren):

  • runtime/JSWrapperObject.h:

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

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

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

Reviewed by Eric Carlson.

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

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

  • platform/audio/mac/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::pullSamplesInternal):

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

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

Reviewed by Philippe Normand.

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

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::isAvailable):

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

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

Unreviewed gardening.

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

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

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

Reviewed by Don Olmstead.

.:

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

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

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

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

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

Source/WebCore:

No new tests needed.

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

Source/WebCore/PAL:

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

Tools:

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

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

Reviewed by Chris Dumez.

  • UIProcess/AuxiliaryProcessProxy.cpp:

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

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

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

Unreviewed gardening.

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

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

Reviewed by Tadeu Zagallo.

JSTests:

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

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

Source/JavaScriptCore:

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

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

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

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

(JSC::StructureStubInfo::addAccessCase):

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

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

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

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

Reviewed by Chris Dumez.

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

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

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

Reviewed by Keith Miller.

JSTests:

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

(shouldThrow):

Source/JavaScriptCore:

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

  • jsc.cpp:

(functionDollarEvalScript):

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

Unreviewed, drop bad assertion introduced in r259610.

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

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::ProcessAssertion::ProcessAssertion):

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

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

Reviewed by Eric Carlson.

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

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

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

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

Reviewed by Chris Fleizach.

  • The initialization of modal nodes was performed in the AXObjectCache

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

  • updateCurrentModalNode was replaced with currentModalNode, and its

implementation cleaned up.

  • Now the initialization and update of AXObjectCached::m_modalNodesSet

and m_currentMOdalNode is clearer.

  • accessibility/AXObjectCache.cpp:

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

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

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

Reviewed by Eric Carlson.

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

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:

(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

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

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

Reviewed by Carlos Garcia Campos.

GtkIconInfo is a GObject since 3.8, update accordingly.

  • platform/graphics/gtk/ImageGtk.cpp:

(WebCore::loadMissingImageIconFromTheme):

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

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

Reviewed by Ryosuke Niwa.

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

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

  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::ensureEffectsAreSorted):

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareAnimationsByCompositeOrder):

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

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

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

Source/WebCore:

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

  • loader/NavigationAction.cpp:

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

  • loader/NavigationAction.h:

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

Source/WebKit:

Adapt to API change.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

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

Tag Safari-610.1.8.3.

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

Versioning.

Note: See TracTimeline for information about the timeline view.