Timeline



Mar 23, 2020:

10:05 PM Changeset in webkit [258908] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Safari jetsams with repeated drawImage/getImageData
https://bugs.webkit.org/show_bug.cgi?id=207957

Reviewed by Tim Horton.

SubimageCacheWithTimer used a DeferrableOneShotTimer to clear itself, but if content
adds an entry to the cache on every frame (as might content drawing video frames into a canvas)
then the cache was never cleared. Nor was it cleared via a memory warning.

Fix by tracking cache entries by age, and using a repeating timer to prune old images
from the cache. Also hook up the cache to the memory pressure handler, which clears it.

Reduce the timer frequency from 1s to 500ms, since that was observed to reduce the memory use
on the provided testcase from ~600M to ~350M, making jetsam less likely.

Rename m_images to m_imageCounts to make its role clearer.

  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

  • platform/graphics/cg/SubimageCacheWithTimer.cpp:

(WebCore::SubimageCacheWithTimer::clear):
(WebCore::SubimageCacheAdder::translate):
(WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
(WebCore::SubimageCacheWithTimer::pruneCacheTimerFired):
(WebCore::SubimageCacheWithTimer::prune):
(WebCore::SubimageCacheWithTimer::subimage):
(WebCore::SubimageCacheWithTimer::clearImageAndSubimages):
(WebCore::SubimageCacheWithTimer::clearAll):
(WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired): Deleted.

  • platform/graphics/cg/SubimageCacheWithTimer.h:
9:51 PM Changeset in webkit [258907] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebCore

[WinCairo][PlayStation] Failure to build with ENABLE_XSLT=OFF
https://bugs.webkit.org/show_bug.cgi?id=209454

Reviewed by Ross Kirsling.

No new tests, build fix.

  • xml/parser/XMLDocumentParserLibxml2.cpp:
9:48 PM Changeset in webkit [258906] by Alan Bujtas
  • 8 edits
    2 copies in trunk

becu.org: Placeholder text "Search" is cut off
https://bugs.webkit.org/show_bug.cgi?id=209447
<rdar://problem/45951728>

Reviewed by Simon Fraser.

Source/WebCore:

'line-height: initial' ensures that that the placeholder text is visible and properly positioned when the input itself has
incompatible values. This is also what Chrome has in their UA stylesheet.

Test: fast/forms/placeholder-content-line-height.html

  • css/html.css:

(input::placeholder):

LayoutTests:

  • fast/forms/placeholder-content-center-expected.html:
  • fast/forms/placeholder-content-center.html:
  • fast/forms/placeholder-content-line-height-expected.html: Copied from LayoutTests/fast/forms/placeholder-content-center-expected.html.
  • fast/forms/placeholder-content-line-height.html: Copied from LayoutTests/fast/forms/placeholder-content-center.html.
9:17 PM Changeset in webkit [258905] by Simon Fraser
  • 4 edits in trunk

[mac-wk1] fast/scrolling/arrow-key-scroll-in-rtl-document.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=209427

Reviewed by Wenson Hsieh.
Source/WebCore:

In WebKit1, arrow-key scrolls are instantaneous, so scrolling is complete before the test
registers the 'monitor wheel events' callback. However, nothing triggers a subsequent rendering
update, so the test never completes.

Fix by having WheelEventTestMonitor::setTestCallbackAndStartMonitoring() trigger a rendering
update.

  • page/WheelEventTestMonitor.cpp:

(WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):

Tools:

0 => NULL

  • DumpRenderTree/mac/DumpRenderTree.mm:

(invalidateAnyPreviousWaitToDumpWatchdog):

9:09 PM Changeset in webkit [258904] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC] Layout::Box::initialContainingBlock() should return const InitialContainingBlock&
https://bugs.webkit.org/show_bug.cgi?id=209406
<rdar://problem/60749715>

Reviewed by Antti Koivisto.

Use is<InitialContainingBlock> where applicable.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::geometryForBox const):
(WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:
  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::absoluteDisplayBox):

  • layout/invalidation/InvalidationState.cpp:

(WebCore::Layout::InvalidationState::markNeedsUpdate):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::containingBlock const):
(WebCore::Layout::Box::formattingContextRoot const):
(WebCore::Layout::Box::initialContainingBlock const):
(WebCore::Layout::Box::isInFormattingContextOf const):
(WebCore::Layout::Box::isOverflowVisible const):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isInitialContainingBlock const):
(WebCore::Layout::Box::isInlineTextBox const):
(WebCore::Layout::Box::isLineBreakBox const):
(WebCore::Layout::Box::isReplacedBox const):

  • layout/layouttree/LayoutInitialContainingBlock.cpp:

(WebCore::Layout::InitialContainingBlock::InitialContainingBlock):

  • layout/layouttree/LayoutInlineTextBox.cpp:

(WebCore::Layout::InlineTextBox::InlineTextBox):

  • layout/layouttree/LayoutLineBreakBox.cpp:

(WebCore::Layout::LineBreakBox::LineBreakBox):

  • layout/layouttree/LayoutReplacedBox.cpp:

(WebCore::Layout::ReplacedBox::ReplacedBox):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputLayoutBox):

8:40 PM Changeset in webkit [258903] by Simon Fraser
  • 2 edits in trunk/LayoutTests

[ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209283

Unreviewed test gardening.

The test needs to call monitorWheelEvents() before each gesture.

  • tiled-drawing/scrolling/scroll-iframe-latched-selects.html:
8:20 PM Changeset in webkit [258902] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

IPC::Decoder::decodeFixedLengthData() should be marked WARN_UNUSED_RETURN
<https://webkit.org/b/209448>
<rdar://problem/60797998>

Reviewed by Chris Dumez.

  • Platform/IPC/ArgumentCoders.h:

(struct VectorArgumentCoder::decode):

  • Check the return value of Decoder::decodeFixedLengthData().
  • Platform/IPC/Decoder.h:

(IPC::Decoder::decodeFixedLengthData): Add WARN_UNUSED_RETURN.

8:02 PM Changeset in webkit [258901] by keith_miller@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

HasIndexedProperty should know about sane chain
https://bugs.webkit.org/show_bug.cgi?id=209457

Reviewed by Saam Barati.

This patch makes it so HasIndexedProperty is aware of
sane chain. This is useful because, most of the time we do an
indexed in it is on an array. If the array has a sane chain (i.e.
no indexed properties on it's prototypes and has the default
prototype chain) then we can just test for the index being a hole.

Note, we could also just convert OOB indices into false but that
should happen in another patch.
https://bugs.webkit.org/show_bug.cgi?id=209456

I didn't add any tests because it turns out we already have a ton.
I know this because I broke most of them repeatedly... >.>

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::setSaneChainIfPossible):
(JSC::DFG::FixupPhase::convertToHasIndexedProperty):

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

(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):
(JSC::FTL::DFG::LowerDFGToB3::speculateAndJump):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::isEmpty):

7:44 PM Changeset in webkit [258900] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r257791): event breakpoint icon should be [E]
https://bugs.webkit.org/show_bug.cgi?id=209434

Reviewed by Timothy Hatcher.

  • UserInterface/Images/TypeIcons.svg:
  • UserInterface/Views/PathComponentIcons.css:

(.snapshot-list-icon .icon):
(@media (prefers-color-scheme: dark) .snapshot-list-icon .icon):
Drive-by: make a separate "HeapSnapshotList" target so that it won't be affected if "Events"

is ever changed.

7:38 PM Changeset in webkit [258899] by Justin Fan
  • 4 edits in trunk/Source/WebCore

[ Mac wk2 Debug ] webgpu/whlsl/vector-compare.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=209024

Reviewed by Myles C. Maxfield.

Prevent GPUBindGroup destructor from accidentally dereferencing GPUBindGroupAllocator too many times
if the owning GPUDevice has already been destroyed. A GPUBindGroupAllocator should reset whenever its
spawned GPUBindGroups are all cleaned up.

Covered by existing tests.

  • platform/graphics/gpu/GPUBindGroupAllocator.h:
  • platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm:

(WebCore::GPUBindGroupAllocator::allocateAndSetEncoders):
(WebCore::GPUBindGroupAllocator::tryReset):

  • platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:

(WebCore::GPUBindGroup::~GPUBindGroup):

7:22 PM Changeset in webkit [258898] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

REGRESSION(r257759, r258623): Web Inspector: Settings icon sometimes placed below the tab bar
https://bugs.webkit.org/show_bug.cgi?id=208603
<rdar://problem/60108967>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/TabBar.js:

(WI.TabBar.prototype.layout):
If the total width of all WI.GeneralTabBarItem is not an integer, it needs to be rounded
when compared to the width of the container WI.TabBar. This is be necessary because CSS
often rounds to the nearest pixel, meaning that 99.5px would actually render as 100px,
whereas 99.4px would render as 99px.

  • UserInterface/Views/TabBar.css:

(body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Added.
(.tab-bar > .tabs.calculate-width > .item:not(.pinned)): Added.
(body:not(.docked) .tab-bar > .tabs > .item:not(.pinned)): Deleted.
(.tab-bar > .tabs.calculate-width > .item): Deleted.
When undocked, force all WI.GeneralTabBarItem to take up as little width as possible when
resizing so that if there isn't enough room for all of them, any that flex-wrap won't be
incorrectly perceived as needing a much larger width.

  • UserInterface/Debug/Bootstrap.css:

(.tab-bar > .navigation-bar .inspect-inspector):
Ensure that the "inspect inspector" navigation item has an integer pixel width.

7:05 PM Changeset in webkit [258897] by dino@apple.com
  • 2 edits in trunk/Tools

webkitpy Git class must expose the repository URL
https://bugs.webkit.org/show_bug.cgi?id=209439
<rdar://problem/60792668>

Reviewed by Simon Fraser.

Some internal tools were relying on the svn_url() method
that was changed/removed in r258164. Add a replacement.

  • Scripts/webkitpy/common/checkout/scm/git.py:

(Git.svn_repository_url):

6:56 PM Changeset in webkit [258896] by Wenson Hsieh
  • 14 edits in trunk/Source

Remove the unused method PasteboardStrategy::uniqueName()
https://bugs.webkit.org/show_bug.cgi?id=209452

Reviewed by Tim Horton.

Source/WebCore:

This was introduced in <https://trac.webkit.org/r107844>, where it was used in the implementation of
Editor::newGeneralClipboard. However, this was subsequently removed in <https://trac.webkit.org/r150351>.

No change in behavior.

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::uniqueName): Deleted.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::uniqueName): Deleted.

Source/WebKit:

See WebCore/ChangeLog for more detail.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::getPasteboardUniqueName): Deleted.

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::uniqueName): Deleted.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

See WebCore/ChangeLog for more detail.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::uniqueName): Deleted.

6:40 PM Changeset in webkit [258895] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/hr-time/test_cross_frame_start.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196944

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:

Remove flaky expectation for the test.

6:31 PM Changeset in webkit [258894] by commit-queue@webkit.org
  • 12 edits in trunk

Unreviewed, reverting r258891.
https://bugs.webkit.org/show_bug.cgi?id=209459

Introduced layout test failures (Requested by perarne on
#webkit).

Reverted changeset:

"[Cocoa] Deny access to database mapping service"
https://bugs.webkit.org/show_bug.cgi?id=209339
https://trac.webkit.org/changeset/258891

6:22 PM Changeset in webkit [258893] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Fix memory leak introduced in r257726
https://bugs.webkit.org/show_bug.cgi?id=208399

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-23
Reviewed by John Wilander.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::websiteDataStore):
We were leaking page configurations.

5:42 PM Changeset in webkit [258892] by ddkilzer@apple.com
  • 2 edits in trunk/LayoutTests

[Win] http/tests/misc/last-modified-parsing.html always fails on Windows EWS
<https://webkit.org/b/209455>

Unreviewed test gardening.

  • platform/win/TestExpectations:
5:15 PM Changeset in webkit [258891] by pvollan@apple.com
  • 12 edits in trunk

[Cocoa] Deny access to database mapping service
https://bugs.webkit.org/show_bug.cgi?id=209339
Source/WebKit:

<rdar://problem/56966010>

Reviewed by Brent Fulgham.

In order for the WebContent process to not have permantent access to the database mapping service,
this patch creates an extension for the service in the UI process, sends it to the WebContent
process, where it is consumed. Then, an API call is made which will map the database, and next the
WebContent process will revoke the extension. The WebContent process has then mapped the database,
and access to the database mapping service is no longer needed.

Tested by: 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/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

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

Source/WTF:

<rdar://problem/56966010>

Reviewed by Brent Fulgham.

Disable the use of UTTypeRecord swizzling, since this is not needed with the new approach
of denying the database mapping service in this patch.

  • wtf/PlatformUse.h:

LayoutTests:

Reviewed by Brent Fulgham.

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
5:06 PM Changeset in webkit [258890] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Add console message when legacy TLS is used
https://bugs.webkit.org/show_bug.cgi?id=209444

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-23
Reviewed by Darin Adler.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveResponse):

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

[ iOS wk2 Debug ] fast/text/control-characters/visible-control-characters-1.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=209450

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:42 PM Changeset in webkit [258888] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Removed FIXME comment for work that had already been done.

  • UIProcess/ios/WKSyntheticTapGestureRecognizer.mm:

(-[WKSyntheticTapGestureRecognizer touchesEnded:withEvent:]):

4:28 PM Changeset in webkit [258887] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] Caller of Delete IC should emit write-barrier onto owner
https://bugs.webkit.org/show_bug.cgi?id=209392
<rdar://problem/60683173>

Reviewed by Saam Barati.

JSTests:

  • stress/delete-ic-requires-write-barrier.js: Added.

(foo):

Source/JavaScriptCore:

DeleteIC can change Structure of the owner cell in the fast path. However it is not emitting write-barrier,
while we are writing a Structure cell id into a JSObject's header.
In this patch,

  1. Emit write-barrier in baseline. Be careful about when emitting write-barrier since it clobbers registers.
  2. DFG and FTL recognize DeleteById / DeleteByVal in DFGStoreBarrierInsertionPhase.
  3. DFGStoreBarrierInsertionPhase only accepts nodes which base is speculated as a Cell. Current DeleteById / DeleteByVal can have UntypedUse base value, but we miss emitting write-barrier DeleteById / DeleteByVal with UntypedUse in the fast path. In this patch, we optimize DeleteById / DeleteByVal only when we speculate child1 as a cell. We can take the further steps after fixing this bug, e.g. (1) accepting UntypedUse in store-barrier-insertion[1] or (2) emitting write-barrier if child1's speculation is UntypedUse. For now, we fix the bug by taking a generic path when child1 is not speculated as a cell. And we can optimize it in a separate change[2].

This is following the design of PutIC.
Currently, we use ShouldFilterBase for emitWriteBarrier. But we could use UnconditionalWriteBarrier here since
we already filter non-cells in Baseline's hot path. I filed it as a separate bug in [3].

[1]: https://bugs.webkit.org/show_bug.cgi?id=209396
[2]: https://bugs.webkit.org/show_bug.cgi?id=209397
[3]: https://bugs.webkit.org/show_bug.cgi?id=209395

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileDeleteById):
(JSC::FTL::DFG::LowerDFGToB3::compileDeleteByVal):

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

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

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emit_op_put_by_id):

4:21 PM Changeset in webkit [258886] by Alan Coon
  • 1 copy in tags/Safari-610.1.7.3.1

Tag Safari-610.1.7.3.1.

4:18 PM Changeset in webkit [258885] by Jason_Lawrence
  • 3 edits in trunk/LayoutTests

[ Mac Debug and iOS ] imported/w3c/web-platform-tests/navigation-timing/test_timing_attributes_order.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209446

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
4:00 PM Changeset in webkit [258884] by wilander@apple.com
  • 30 edits
    3 adds in trunk

Add the capability to change all of a website's cookies to SameSite=Strict
https://bugs.webkit.org/show_bug.cgi?id=209369
<rdar://problem/60710690>

Reviewed by Alex Christensen and David Kilzer.

Source/WebCore:

Test: http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html

  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):

Stub function for non-Cocoa platforms.

  • platform/network/NetworkStorageSession.h:
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):

  • testing/Internals.h:

Added code to expose SameSite=None and path properties of cookies.
However, they don't seem to carry over so I'll have to revisit the
internal workings.

Source/WebKit:

These changes add test infrastructure to run function
WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict() in the
network process.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setToSameSiteStrictCookiesForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetResourceLoadStatisticsToSameSiteStrictCookiesForTesting):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setToSameSiteStrictCookiesForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsToSameSiteStrictCookiesForTesting):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Source/WTF:

  • wtf/PlatformHave.h:

Adds HAVE_CFNETWORK_SAMESITE_COOKIE_API for macOS Catalina and up,
iOS 13 and up, Catalyst, watchOS, and Apple TV.

Tools:

These changes add TestRunner function statisticsSetToSameSiteStrictCookies().

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsSetToSameSiteStrictCookies):
(WTR::TestRunner::statisticsCallDidSetToSameSiteStrictCookiesCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsToSameSiteStrictCookies):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didSetToSameSiteStrictCookies):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

  • http/tests/resourceLoadStatistics/resources/set-all-kinds-of-cookies.php: Added.
  • http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict-expected.txt: Added.
  • http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html: Added.
  • platform/ios/TestExpectations:

Marked http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html
as Pass.

  • platform/mac-wk2/TestExpectations:

Marked http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html
as Pass for Catalina+.

  • platform/wk2/TestExpectations:

Skipped http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html
since it's only available on macOS Catalina and up and the functionality is not
implemented on non-Cocoa platforms.

3:59 PM Changeset in webkit [258883] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WPE][GTK] Allow distributors to brand user agent
https://bugs.webkit.org/show_bug.cgi?id=162611

Unreviewed, un-break my previous commit.

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-03-23

  • platform/glib/UserAgentGLib.cpp:

(WebCore::standardUserAgent):

3:53 PM Changeset in webkit [258882] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

[iOS WK2] compositing/overflow/dynamic-composited-scrolling-status.html asserts
https://bugs.webkit.org/show_bug.cgi?id=209440
<rdar://problem/60705261>

Reviewed by Wenson Hsieh.

nonFastScrollableRectsForTesting() needs to eagerly update event regions after r258528,
as we do for touchEventRectsForEventForTesting().

Also renamed the function so it's clear that it's for testing only.

  • page/Page.cpp:

(WebCore::Page::nonFastScrollableRectsForTesting):
(WebCore::Page::nonFastScrollableRects): Deleted.

  • page/Page.h:
  • testing/Internals.cpp:

(WebCore::Internals::nonFastScrollableRects const):

3:48 PM Changeset in webkit [258881] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mac wk1 Debug ] http/tests/css/shared-stylesheet-mutation-preconstruct.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209442

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:44 PM Changeset in webkit [258880] by dino@apple.com
  • 4 edits in trunk

Set important EGL context attributes
https://bugs.webkit.org/show_bug.cgi?id=208724

Patch by James Darpinian <James Darpinian> on 2020-03-06
Reviewed by Dean Jackson.

Re-landing after r258875.

These EGL context attributes are important to make ANGLE's validation correct for
WebGL contexts. ROBUST_RESOURCE_INITIALIZATION is especially important; the lack
of it may be a root cause of some of the test flakiness we have seen. With this
change WebKit's EGL context attributes now match Chromium's for ANGLE/WebGL
contexts.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

3:14 PM Changeset in webkit [258879] by Nikos Mouchtaris
  • 2 edits in trunk/Tools

Uneviewed, added myself to contributors.json.

  • Scripts/webkitpy/common/config/contributors.json:
2:59 PM Changeset in webkit [258878] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[Win] Unreviewed test gardening.

  • platform/win/TestExpectations:
2:50 PM Changeset in webkit [258877] by commit-queue@webkit.org
  • 5 edits in trunk

[GTK] Allow distributors to brand user agent
https://bugs.webkit.org/show_bug.cgi?id=162611

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-03-23
Reviewed by Adrian Perez de Castro.

.:

Add build option for inserting distributor branding into the user agent string.

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

Source/WebCore:

  • platform/glib/UserAgentGLib.cpp:

(WebCore::buildUserAgentString):

2:28 PM Changeset in webkit [258876] by Alan Coon
  • 8 edits in branches/safari-610.1.7.3-branch/Source

Versioning.

2:28 PM Changeset in webkit [258875] by dino@apple.com
  • 11 edits in trunk

[WebGL] Skip vertexAttrib0 simulation when using ANGLE
https://bugs.webkit.org/show_bug.cgi?id=209416
<rdar://problem/60765734>

Reviewed by Antoine Quint.

Source/WebCore:

When using ANGLE as a backend, we do not need to simulate a
missing vertexAttrib0 at the WebGL layer, since ANGLE will
handle it for us.

This causes a couple of tests to begin passing (they were marked as
failures). It also allows us to re-land r258025, which was rolled
out in r258226.

  • html/canvas/WebGL2RenderingContext.cpp: Wrap any code that does vertexAttrib0

simulation in a !USE(ANGLE).
(WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::initializeVertexArrayObjects):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::validateDrawArrays):
(WebCore::WebGLRenderingContextBase::validateDrawElements):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getVertexAttrib):
(WebCore::WebGLRenderingContextBase::vertexAttribfImpl):
(WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLVertexArrayObjectBase.cpp:

(WebCore::WebGLVertexArrayObjectBase::unbindBuffer):

LayoutTests:

Remove the console logging that is no longer output when using ANGLE.
Remove failing expectations for some tests.

  • fast/canvas/webgl/index-validation-with-subsequent-draws-expected.txt:
  • fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays-expected.txt:
  • platform/mac/TestExpectations:
2:09 PM Changeset in webkit [258874] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] DFG OSR exit cannot find StructureStubInfo for put_by_val if CodeBlock is once converved from Baseline to LLInt
https://bugs.webkit.org/show_bug.cgi?id=209327
<rdar://problem/60631061>

Reviewed by Saam Barati.

JSTests:

  • stress/osr-exit-attempts-to-find-stubinfo-which-is-cleared-by-previous-baseline-to-llint-conversion.js: Added.

(setter):
(foo):

Source/JavaScriptCore:

DFG compiles op_put_by_val as PutById and inlines SetterCall only when DFG found StructureStubInfo for this op_put_by_val.
However, it is still possible that DFG OSR exit cannot find StructureStubInfo for SetterCall generated by op_put_by_val.
Let's consider the following scenario.

  1. Baseline CodeBlock (A) is compiled.
  2. (A) gets DFG (B).
  3. Since (A) collects enough information for put_by_val, (B) can get StructureStubInfo from (A) and compile it as inlined Setter call.
  4. (A)'s JITData is destroyed since it is not executed. Then, (A) becomes LLInt.
  5. The CodeBlock inlining (A) gets OSR exit. So (A) is executed and (A) eventually gets Baseline CodeBlock again.
  6. (B) gets OSR exit. (B) attempts to search for StructureStubInfo in (A) for PutById (originally, put_by_val). But it does not exist since (A)'s JITData is cleared once.

We should just link to doneTarget of ByValInfo when the SetterCall is generated by op_put_by_val. ByValInfo and its doneTarget always exists per op_put_by_val.

  • bytecode/ByValInfo.h:

(JSC::ByValInfo::ByValInfo):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::findByValInfo):

  • bytecode/CodeBlock.h:
  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):

2:00 PM Changeset in webkit [258873] by dbates@webkit.org
  • 10 edits
    1 add in trunk

Support inserting text or dictation alternative by simulating keyboard input
https://bugs.webkit.org/show_bug.cgi?id=209380
<rdar://problem/59445102>

Reviewed by Darin Adler.

Source/WebKit:

As a workaround for sites the implement their own editing system (e.g. facebook.com)
add a new insertion option that makes the insertion having a passing resemblance
of a person typing. The resemblance is achieved by dispatching DOM events with type
"keydown", "keyup", and "change".

  • Shared/Cocoa/InsertTextOptions.cpp:

(IPC::ArgumentCoder<WebKit::InsertTextOptions>::encode):
(IPC::ArgumentCoder<WebKit::InsertTextOptions>::decode):
Encode and decode the new option.

  • Shared/Cocoa/InsertTextOptions.h: Default the new option, shouldSimulateKeyboardInput,

to false to keep our current behavior.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _shouldSimulateKeyboardInputOnTextInsertion]): Added. Returns NO when
building without USE(TEXT_INTERACTION_ADDITIONS) to keep the current behavior.

(-[WKContentView insertText:]):
(-[WKContentView insertText:alternatives:style:]):
Set the shouldSimulateKeyboardInput option.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::insertDictatedTextAsync):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::insertTextAsync):
If shouldSimulateKeyboardInput is false then do what we do now. Otherwise, dispatch a DOM event
of type "keydown" and perform the insertion. Then dispatch DOM events of type "keyup" and "change".

Tools:

Add tests to ensure that DOM events are dispatched on insertion when shouldSimulateKeyboardInput
is enabled.

I also added a convenience assertion function, EXPECT_NS_EQUAL, that can
compare NSObjects so long as they implement -isEqual and -description. I
make use of this to compare the actual array of fired DOM events types to
an expected array.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

(TestWebKitAPI::shouldSimulateKeyboardInputOnTextInsertionOverride):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestCocoa.h:

(TestWebKitAPI::Util::assertNSObjectsAreEqual): Added.
(EXPECT_NS_EQUAL): Added.

  • TestWebKitAPI/ios/insert-text.html: Added.
1:53 PM Changeset in webkit [258872] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

1:50 PM Changeset in webkit [258871] by Darin Adler
  • 36 edits in trunk

Change TextIterator::rangeLength to not require a live range
https://bugs.webkit.org/show_bug.cgi?id=209207

Reviewed by Antti Koivisto.

Source/WebCore:

  • Renamed TextIterator::rangeLength to characterCount.
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::rangeMatchesTextNearRange): Use characterCount.
(WebCore::resetNodeAndOffsetForReplacedNode): Ditto.
(WebCore::AXObjectCache::nextCharacterOffset): Ditto.

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Ditto.

  • accessibility/atk/WebKitAccessibleHyperlink.cpp:

(rangeLengthForObject): Ditto.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _convertToNSRange:]): Ditto.

  • dom/SimpleRange.h: Export another constructor.
  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::applyAlternativeTextToRange):
Use characterCount.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyBlockStyle): Ditto.

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs): Ditto.

  • editing/Editing.cpp:

(WebCore::indexForVisiblePosition): Ditto.

  • editing/TextCheckingHelper.cpp:

(WebCore::TextCheckingParagraph::rangeLength const): Ditto.
(WebCore::TextCheckingParagraph::offsetTo const): Ditto.
(WebCore::TextCheckingParagraph::checkingStart const): Ditto.
(WebCore::TextCheckingParagraph::checkingEnd const): Ditto.
(WebCore::TextCheckingParagraph::checkingLength const): Ditto.
(WebCore::TextCheckingParagraph::automaticReplacementStart const): Ditto.
(WebCore::TextCheckingParagraph::automaticReplacementLength const): Ditto.
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto.
(WebCore::TextCheckingHelper::isUngrammatical const): Ditto.

  • editing/TextIterator.cpp:

(WebCore::TextIterator::rangeLength): Deleted.
(WebCore::characterCount): Like the baove but the argument is SimpleRange
and return is CharacterCount. Even though each individual node is limited
to 32-bit size, ranges covering multiple nodes could have a count of
characters that exceeds 32 bits, so CharacterCount is size_t.
(WebCore::TextIterator::getLocationAndLengthFromRange): Use characterCount.

  • editing/TextIterator.h: Added characterCount function,

CharacterCount and CharacterRange types. Removed TextIterator::rangeLength.
Added FIXME comments about the next steps.

  • editing/VisiblePosition.cpp:

(WebCore::makeBoundaryPoint): Added.

  • editing/VisiblePosition.h: Added makeBoundaryPoint. Also removed

extraneous forward declarations and moved some function bodies out of the
class definition.

  • editing/VisibleUnits.cpp:

(WebCore::distanceBetweenPositions): Changed return type to ptrdiff_t.
Use characterCount.

  • editing/VisibleUnits.h: Updated for the above.
  • editing/cocoa/DataDetection.mm:

(WebCore::detectItemAtPositionWithRange): Use characterCount.

  • editing/cocoa/DictionaryLookup.mm:

(WebCore::DictionaryLookup::rangeForSelection): Ditto.
(WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.

  • editing/ios/DictationCommandIOS.cpp:

(WebCore::DictationCommandIOS::doApply): Ditto.

  • editing/mac/DictionaryLookupLegacy.mm:

(WebCore::DictionaryLookup::rangeForSelection): Ditto.
(WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.

  • page/EventHandler.cpp:

(WebCore::textDistance): Ditto.

Source/WebKit:

  • Shared/EditingRange.cpp:

(WebKit::EditingRange::toRange): Use characterCount.

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::insertionPointFromCurrentSelection): Changed return type to
CharacterCount and use characterCount.
(WebKit::WebEditorClient::supportsGlobalSelection): Tweaked #if.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::targetFrameForEditing): Use characterCount.

  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::platformEditorState const): Ditto.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeNearPositionMatchesText): Ditto.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::platformEditorState const): Ditto.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.mm:

(insertionPointFromCurrentSelection): Use characterCount.
(WebEditorClient::requestCandidatesForSelection): Ditto.

  • WebView/WebFrame.mm:

(-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]): Ditto.

LayoutTests:

  • editing/mac/spelling/autocorrection-contraction-expected.txt: Update these expected

results because of changes to delegate callbacks. The test is still passing and this
change is only in the legacy WebKit case (there is a separate result for modern WebKit).
This seems to be a progression, not evidence of a bug.

1:19 PM Changeset in webkit [258870] by Russell Epstein
  • 16 edits
    2 adds in branches/safari-609-branch/Source

[Cocoa] Push applicationSDKVersion() down from WebCore into WTF
https://bugs.webkit.org/show_bug.cgi?id=209030

Reviewed by Simon Fraser.

Source/JavaScriptCore:

dyld_get_program_sdk_version() gives you the wrong answer in the Web Process (or at least
not the answer you actually want). There are already facilities for the UI Process to tell
the Web Process what the real value is, but those functions are currently in WebCore,
which is inaccessible to WTF. This patch is in preparation for
https://bugs.webkit.org/show_bug.cgi?id=208969 which needs to know this information in WTF.

I also found a few places which were calling dyld_get_program_sdk_version() in JavaScriptCore
and WebCore (which is wrong because those libraries exist in the Web Process), and have fixed
them up to use applicationSDKVersion() instead.

  • API/JSWrapperMap.mm:

(supportsInitMethodConstructors):

Source/WebCore:

  • html/HTMLObjectElement.cpp:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):

  • platform/RuntimeApplicationChecks.h:
  • platform/Timer.cpp:

(WebCore::shouldSuppressThreadSafetyCheck):

  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::applicationSDKVersionOverride): Deleted.
(WebCore::setApplicationSDKVersion): Deleted.
(WebCore::applicationSDKVersion): Deleted.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCSSOMViewScrollingAPIEnabled):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/PlatformMac.cmake:
  • wtf/cocoa/RuntimeApplicationChecksCocoa.cpp: Added.
  • wtf/cocoa/RuntimeApplicationChecksCocoa.h: Added.

(WTF::applicationSDKVersionOverride):
(WTF::setApplicationSDKVersion):
(WTF::applicationSDKVersion):

12:46 PM Changeset in webkit [258869] by youenn@apple.com
  • 33 edits in trunk/Source

Rename blankURL to aboutBlankURL
https://bugs.webkit.org/show_bug.cgi?id=209344

Reviewed by Darin Adler.

Source/WebCore:

No change of behavior.

  • dom/Document.cpp:

(WebCore::Document::setURL):
(WebCore::Document::completeURL const):
(WebCore::Document::ensureTemplateDocument):

  • dom/Document.h:

(WebCore::Document::urlForBindings const):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::parserContextForElement):

  • dom/Node.cpp:

(WebCore::Node::baseURI const):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::WebContentReader::readWebArchive):

  • editing/markup.cpp:

(WebCore::createFragmentFromMarkup):

  • html/DOMURL.cpp:

(WebCore::DOMURL::create):

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::location const):

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::filterScriptToken):
(WebCore::XSSAuditor::filterObjectToken):
(WebCore::XSSAuditor::filterParamToken):
(WebCore::XSSAuditor::filterEmbedToken):
(WebCore::XSSAuditor::filterFormToken):
(WebCore::XSSAuditor::filterInputToken):
(WebCore::XSSAuditor::filterButtonToken):
(WebCore::XSSAuditor::isLikelySafeResource):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::maybeLoadEmpty):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::serverRedirectSourceForHistory const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadWithDocumentLoader):

  • loader/HistoryController.cpp:

(WebCore::HistoryController::currentItemShouldBeReplaced const):
(WebCore::HistoryController::initializeItem):

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::requestFrame):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createFromSelection):

  • page/Location.cpp:

(WebCore::Location::url const):

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::markupToCFHTML):

  • svg/SVGImageLoader.cpp:

(WebCore::SVGImageLoader::sourceURI const):

Source/WebKit:

  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadPlainTextStringWithUserData):

  • UIProcess/API/C/WKPageGroup.cpp:

(WKPageGroupAddUserStyleSheet):
(WKPageGroupAddUserScript):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_load_plain_text):

  • UIProcess/Inspector/WebPageDebuggable.cpp:

(WebKit::WebPageDebuggable::url const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadWebArchiveData):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::dumpHistoryForTesting):
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::updateGlobalHistory):

  • WebView/WebFrame.mm:

(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

Source/WTF:

Rename blankURL to aboutBlankURL and allow using it without WTF:: prefix.

  • wtf/URL.cpp:

(WTF::aboutBlankURL):
(WTF::blankURL): Deleted.

  • wtf/URL.h:
12:33 PM Changeset in webkit [258868] by youenn@apple.com
  • 4 edits
    1 delete in trunk/Source/WebCore

Remove DOMCache::m_records
https://bugs.webkit.org/show_bug.cgi?id=209425

Reviewed by Alex Christensen.

We do not need to keep references of FetchRequest and FetchResponse since we clone them before exposing them.
For that reason, remove m_records and directly use records given from the CacheStorageConnection.
Minor refactoring to modernize/improve code readability.

This is a first step towards a future refactoring that will reduce the sending of records from network process to web process
based on the request parameters: record filtering will be done in network process instead of web process.

No change of behavior.

  • Modules/cache/DOMCache.cpp:

(WebCore::createResponse):
(WebCore::DOMCache::doMatch):
(WebCore::DOMCache::cloneResponses):
(WebCore::DOMCache::matchAll):
(WebCore::createRequest):
(WebCore::DOMCache::keys):
(WebCore::DOMCache::retrieveRecords):
(WebCore::DOMCache::queryCache):
(WebCore::DOMCache::queryCacheWithTargetStorage):
(WebCore::DOMCache::batchDeleteOperation):
(WebCore::DOMCache::batchPutOperation):
(WebCore::copyRequestRef): Deleted.
(WebCore::queryCacheMatch): Deleted.
(WebCore::DOMCache::updateRecords): Deleted.

  • Modules/cache/DOMCache.h:
12:32 PM Changeset in webkit [258867] by Alan Coon
  • 1 copy in branches/safari-610.1.7.3-branch

New branch.

12:31 PM Changeset in webkit [258866] by commit-queue@webkit.org
  • 12 edits in trunk

XMLHttpRequest: getAllResponseHeaders() sorting
https://bugs.webkit.org/show_bug.cgi?id=200565

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

LayoutTests/imported/w3c:

Update improved test result.

  • web-platform-tests/xhr/getallresponseheaders-expected.txt:

Source/WebCore:

Sort headers using the ASCII-uppercase header name as key but use ASCII-lowercase header
names in the string result.

Nehavior matches Firefox and Chrome.

Test: imported/web-platform-tests/xhr/getallresponseheaders.htm

[1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::getAllResponseHeaders const):

Source/WTF:

Add a new manipulator that can efficiently convert
Strings to lower or upper ASCII.

  • wtf/text/StringConcatenate.h:

(WTF::lowercase):
(WTF::uppercase):

  • wtf/text/StringView.cpp:

(WTF::getCharactersWithASCIICaseInternal):
(WTF::StringView::getCharactersWithASCIICase const):

  • wtf/text/StringView.h:

LayoutTests:

Update improved test results.

  • platform/ios/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt:
  • platform/mac-highsierra/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt:
  • platform/mac-mojave/imported/w3c/web-platform-tests/xhr/getallresponseheaders-expected.txt:
12:05 PM Changeset in webkit [258865] by Ross Kirsling
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, address Yusuke's feedback on r258801.

  • builtins/RegExpPrototype.js:

(globalPrivate.hasObservableSideEffectsForRegExpSplit):

  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_tryGetById):

11:49 AM Changeset in webkit [258864] by Truitt Savell
  • 13 edits in trunk/Source/WebCore

Unreviewed, reverting r258847.

Broke testing on Mac Debug with an Assert

Reverted changeset:

"[LFC] Layout::Box::initialContainingBlock() should return
const InitialContainingBlock&"
https://bugs.webkit.org/show_bug.cgi?id=209406
https://trac.webkit.org/changeset/258847

11:47 AM Changeset in webkit [258863] by Kate Cheney
  • 5 edits in trunk

Add checks for app-bound navigations when evaluating user style sheets
https://bugs.webkit.org/show_bug.cgi?id=209368
<rdar://problem/60204230>

Reviewed by Brent Fulgham.

Source/WebCore:

  • page/Page.cpp:

(WebCore::Page::injectUserStyleSheet):
If the style sheet is for a specific WebView, it will have a pageID
and we can check for app-bound navigation in the page object.

  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::initializeUserStyle):
If the user style sheet is being applied to all WebViews, we can check for
for a page's existence and navigation state here before the style sheet is
updated.

Tools:

Tested cases based on those in UserContentController.mm.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(-[InAppBrowserSchemeHandler webView:startURLSchemeTask:]):
(expectScriptEvaluatesToColor):
(TEST):

11:40 AM Changeset in webkit [258862] by achristensen@apple.com
  • 20 edits in trunk

Add SPI to move localStorage to a different domain
https://bugs.webkit.org/show_bug.cgi?id=209260
<rdar://problem/60285683>

Reviewed by Brady Eidson.

Source/WebKit:

Covered by an API test.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::renameDomainInWebsiteData):
(WebKit::NetworkProcess::getLocalStorageOriginDetails):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/WebStorage/LocalStorageNamespace.cpp:

(WebKit::LocalStorageNamespace::renameDomain):

  • NetworkProcess/WebStorage/LocalStorageNamespace.h:
  • NetworkProcess/WebStorage/StorageArea.cpp:

(WebKit::StorageArea::close):

  • NetworkProcess/WebStorage/StorageArea.h:
  • NetworkProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::renameDomain):

  • NetworkProcess/WebStorage/StorageManager.h:
  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::renameDomain):

  • NetworkProcess/WebStorage/StorageManagerSet.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _renameDomain:to:forDataOfTypes:completionHandler:]):

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

(WebKit::NetworkProcessProxy::renameDomainInWebsiteData):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::renameDomainInWebsiteData):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

11:23 AM Changeset in webkit [258861] by Ross Kirsling
  • 5 edits in trunk

Catch parameters must not be lexically redeclared
https://bugs.webkit.org/show_bug.cgi?id=208976

Reviewed by Keith Miller.

JSTests:

  • test262/expectations.yaml:

Mark four test cases as passing.

Source/JavaScriptCore:

From https://tc39.es/ecma262/#sec-try-statement-static-semantics-early-errors:

Catch : catch ( CatchParameter ) Block

It is a Syntax Error if any element of the BoundNames of CatchParameter
also occurs in the LexicallyDeclaredNames of Block.

In other words, let/const/class/function declarations in the immediate catch block scope
must not shadow catch parameters.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseTryStatement):
(JSC::Parser<LexerType>::parseBlockStatement):

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::setIsCatchBlockScope): Added.
(JSC::Scope::isCatchBlockScope): Added.
(JSC::Parser::declareVariable):
(JSC::Parser::declareFunction):

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

Disable TestWebKitAPI.ProcessSwap.GetUserMediaCaptureState if getUserMedia is not supported
https://bugs.webkit.org/show_bug.cgi?id=209428

Reviewed by Jonathan Bedard.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:01 AM Changeset in webkit [258859] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

Fixing merge conflict

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:50 AM Changeset in webkit [258858] by graouts@webkit.org
  • 4 edits in trunk/Source

DocumentTimeline / CSSTransition objects are leaking on CNN.com
https://bugs.webkit.org/show_bug.cgi?id=208069
<rdar://problem/59680143>

Reviewed by Darin Adler.

Integrating post-commit review feedback from Darin.

Source/WebCore:

  • testing/Internals.cpp:

(WebCore::Internals::animationWithIdExists const):

Source/WTF:

  • wtf/ListHashSet.h:

(WTF::=):

10:49 AM WebKitGTK/2.28.x edited by clopez@igalia.com
(diff)
10:34 AM Changeset in webkit [258857] by commit-queue@webkit.org
  • 7 edits in trunk/Source

REGRESSION(r249808): [GTK] Crash in JSC Config::permanentlyFreeze() on architecture ppc64el
https://bugs.webkit.org/show_bug.cgi?id=209236

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-03-23
Reviewed by Mark Lam.

Source/JavaScriptCore:

  • heap/MarkedBlock.h: Use new CeilingOnPageSize.
  • runtime/JSCConfig.cpp:

(JSC::Config::permanentlyFreeze): Use pageSize instead of vmPageSize.

  • runtime/JSCConfig.h: Use new CeilingOnPageSize.

Source/WTF:

Add new CeilingOnPageSize constants, for use in JSC, in order to centralize our compile-time
page size guessing into one place. Improve the implementation of pageSize() to
RELEASE_ASSERT() when CeilingOnPageSize is wrong, so we can detect and fix it if so. (It
will be even easier to detect if we change RELEASE_ASSERT_WITH_MESSAGE() to actually print
its message in release builds.) Change pageSize() to use sysconf(_SC_PAGESIZE), which is
specified by POSIX, instead of getpagesize(), which is nonstandard.

  • wtf/PageBlock.cpp:

(WTF::systemPageSize):
(WTF::pageSize):

  • wtf/PageBlock.h:
10:00 AM Changeset in webkit [258856] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-609-branch

Cherry-pick r258799. rdar://problem/60756681

Content-Type & Nosniff Ignored on XML External Entity Resources
<https://webkit.org/b/191171>
<rdar://problem/45763222>

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml

  • platform/MIMETypeRegistry.cpp: (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
  • platform/MIMETypeRegistry.h: (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
  • Checks for XML external entity MIME types.
  • xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::externalEntityMimeTypeAllowedByNosniff): Add.
  • Checks whether the MIME type is valid based on the presence of the "X-Content-Type-Options: nosniff" header. (WebCore::openFunc):
  • Drop the contents of the resource that was returned and print an error message to the Web Inspector console if externalEntityMimeTypeAllowedByNosniff() says the MIME type is not allowed.

LayoutTests:

  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt: Add.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml: Add.

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

10:00 AM Changeset in webkit [258855] by Russell Epstein
  • 5 edits in branches/safari-609-branch

Cherry-pick r258741. rdar://problem/60756641

Sanitize suggested download filename received from web process
https://bugs.webkit.org/show_bug.cgi?id=209300
<rdar://problem/59487723>

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

Source/WebKit:

  • UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):

LayoutTests:

  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:

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

10:00 AM Changeset in webkit [258854] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-609-branch

Cherry-pick r258711. rdar://problem/60756645

Source/WebCore:
AX: VO and safari: can't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

  • accessibility/ios/AccessibilityObjectIOS.mm: (WebCore::AccessibilityObject::hasTouchEventListener const):

LayoutTests:
AX: VO and safari: caan't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

  • accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
  • accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.

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

10:00 AM Changeset in webkit [258853] by Russell Epstein
  • 2 edits in branches/safari-609-branch/Source/WTF

Cherry-pick r258658. rdar://problem/60756680

REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale
https://bugs.webkit.org/show_bug.cgi?id=208969
<rdar://problem/59845517>

Reviewed by Darin Adler.

We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.
We can achieve both by a linked-on-or-after check.

  • wtf/cocoa/LanguageCocoa.mm: (WTF::canMinimizeLanguages):

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

9:52 AM Changeset in webkit [258852] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Win] http/wpt/css/css-animations/start-animation-001.html is failing on Windows EWS
https://bugs.webkit.org/show_bug.cgi?id=209426

Unreviewed test gardening.

  • platform/win/TestExpectations:
9:52 AM Changeset in webkit [258851] by Russell Epstein
  • 3 edits in branches/safari-609-branch/Source/WebKit

Apply patch. rdar://problem/60756683

9:51 AM Changeset in webkit [258850] by Chris Dumez
  • 13 edits in trunk

Port window.postMessage to the HTML event loop
https://bugs.webkit.org/show_bug.cgi?id=209359

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline test now that the logging ordering is slightly different.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/WebCore:

Port window.postMessage to the HTML event loop instead of using a 0-timer.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willPostMessageImpl):
(WebCore::InspectorInstrumentation::didPostMessageImpl):
(WebCore::InspectorInstrumentation::didFailPostMessageImpl):
(WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
(WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willPostMessage):
(WebCore::InspectorInstrumentation::didPostMessage):
(WebCore::InspectorInstrumentation::didFailPostMessage):
(WebCore::InspectorInstrumentation::willDispatchPostMessage):
(WebCore::InspectorInstrumentation::didDispatchPostMessage):

  • inspector/agents/WebDebuggerAgent.cpp:

(WebCore::WebDebuggerAgent::willPostMessage):
(WebCore::WebDebuggerAgent::didPostMessage):
(WebCore::WebDebuggerAgent::didFailPostMessage):
(WebCore::WebDebuggerAgent::willDispatchPostMessage):
(WebCore::WebDebuggerAgent::didDispatchPostMessage):
(WebCore::WebDebuggerAgent::didClearAsyncStackTraceData):

  • inspector/agents/WebDebuggerAgent.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):
(WebCore::PostMessageTimer::PostMessageTimer): Deleted.
(WebCore::PostMessageTimer::event): Deleted.
(WebCore::PostMessageTimer::targetOrigin const): Deleted.
(WebCore::PostMessageTimer::stackTrace const): Deleted.
(WebCore::DOMWindow::postMessageTimerFired): Deleted.

  • page/DOMWindow.h:

LayoutTests:

Update tests so that it does not run postMessage tests in parallel on the 2 different-origin iframes,
since the ordering would not be guaranteed and it would cause flakiness.

  • http/tests/security/postMessage/resources/recv.js:

(recv):

  • http/tests/security/postMessage/target-origin-expected.txt:
  • http/tests/security/postMessage/target-origin.html:
9:43 AM Changeset in webkit [258849] by Russell Epstein
  • 2 edits in branches/safari-609-branch/Source/WebKit

Apply patch. rdar://problem/60555343

Cherry-pick r258565. rdar://problem/60555343

2020-03-17 David Kilzer <ddkilzer@apple.com>

REGRESSION (r258334): WebPasteboardProxy::setPasteboardBufferForType should allow zero-size buffers
<https://webkit.org/b/209167>
<rdar://problem/60516302>

Reviewed by Geoffrey Garen.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
  • Remove check for zero-size buffer to match WebPageProxy::dataSelectionForPasteboard().
9:15 AM Changeset in webkit [258848] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: this._springEditor.removeListeners is not a function. (In 'this._springEditor.removeListeners()', 'this._springEditor.removeListeners' is undefined)
https://bugs.webkit.org/show_bug.cgi?id=209325

Reviewed by Brian Burg.

  • UserInterface/Controllers/CodeMirrorSpringEditingController.js:

(WI.CodeMirrorSpringEditingController.prototype.popoverDidDismiss): Deleted.

9:08 AM Changeset in webkit [258847] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC] Layout::Box::initialContainingBlock() should return const InitialContainingBlock&
https://bugs.webkit.org/show_bug.cgi?id=209406
<rdar://problem/60749715>

Reviewed by Antti Koivisto.

Use is<InitialContainingBlock> where applicable.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::geometryForBox const):
(WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:
  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::absoluteDisplayBox):

  • layout/invalidation/InvalidationState.cpp:

(WebCore::Layout::InvalidationState::markNeedsUpdate):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::containingBlock const):
(WebCore::Layout::Box::formattingContextRoot const):
(WebCore::Layout::Box::initialContainingBlock const):
(WebCore::Layout::Box::isInFormattingContextOf const):
(WebCore::Layout::Box::isOverflowVisible const):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isInitialContainingBlock const):
(WebCore::Layout::Box::isInlineTextBox const):
(WebCore::Layout::Box::isLineBreakBox const):
(WebCore::Layout::Box::isReplacedBox const):

  • layout/layouttree/LayoutInitialContainingBlock.cpp:

(WebCore::Layout::InitialContainingBlock::InitialContainingBlock):

  • layout/layouttree/LayoutInlineTextBox.cpp:

(WebCore::Layout::InlineTextBox::InlineTextBox):

  • layout/layouttree/LayoutLineBreakBox.cpp:

(WebCore::Layout::LineBreakBox::LineBreakBox):

  • layout/layouttree/LayoutReplacedBox.cpp:

(WebCore::Layout::ReplacedBox::ReplacedBox):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputLayoutBox):

8:38 AM Changeset in webkit [258846] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

[MSE] Handle the case where AVStreamDataParser packages sync and non-sync samples together in a CMSampleBufferRef.
https://bugs.webkit.org/show_bug.cgi?id=209365
<rdar://problem/60625209>

Reviewed by Eric Carlson.

AVStreamDataParser will package together muliple samples into a single CMSampleBufferRef for efficiency's sake. When
this occurs, it may include sync and non-sync samples together into the same CMSampleBufferRef, which is problematic
as we consider a CMSampleBufferRef to be "sync" only when every sample inside the buffer is also sync.

To handle this scenario, when receiving a CMSampleBufferRef from AVStreamDataParser, first check whether that buffer
is "homogeneous", meaning every sample within the buffer has the same effective MediaSample flags. Then, if the buffer
is not homogenous, break the buffer into muliple homogenious CMSampleBufferRefs. Then, each of those resulting buffers
is passed up to SourceBuffer as a MediaSample individually.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::isCMSampleBufferAttachmentRandomAccess):
(WebCore::isCMSampleBufferRandomAccess):
(WebCore::isCMSampleBufferAttachmentNonDisplaying):
(WebCore::isCMSampleBufferNonDisplaying):
(WebCore::MediaSampleAVFObjC::flags const):
(WebCore::MediaSampleAVFObjC::isHomogeneous const):
(WebCore::MediaSampleAVFObjC::divideIntoHomogeneousSamples):

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

(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):

8:35 AM Changeset in webkit [258845] by pvollan@apple.com
  • 5 edits in trunk

[iOS] Deny mach lookup access to icon services
https://bugs.webkit.org/show_bug.cgi?id=209340

Reviewed by Brent Fulgham.

Source/WebKit:

Tested by fast/sandbox/ios/sandbox-mach-lookup.html

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

LayoutTests:

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
8:27 AM Changeset in webkit [258844] by aboya@igalia.com
  • 4 edits in trunk/Source/WebCore

[MSE][GStreamer] Clean and explain first sample PTS hack
https://bugs.webkit.org/show_bug.cgi?id=209335

Reviewed by Philippe Normand.

MediaSample::applyPtsOffset() had a rather confusing name, so it has
been changed to something more descriptive of its actual function:
extendToTheBeginning().

Also, its only argument has been removed, as it's always zero.

An explanation of the hack has also been added.

This patch introduces no behavior changes.

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::extendToTheBeginning):
(WebCore::MediaSampleGStreamer::applyPtsOffset): Deleted.

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::appsinkNewSample):

8:25 AM Changeset in webkit [258843] by Alan Bujtas
  • 7 edits
    1 delete in trunk/Source/WebCore

[LFC] Remove unused LayoutAncestorIterator class
https://bugs.webkit.org/show_bug.cgi?id=209401
<rdar://problem/60743144>

Reviewed by Sam Weinig.

  • WebCore.xcodeproj/project.pbxproj:
  • layout/blockformatting/BlockFormattingContextGeometry.cpp:
  • layout/displaytree/DisplayPainter.cpp:
  • layout/layouttree/LayoutAncestorIterator.h: Removed.
  • layout/layouttree/LayoutChildIterator.h:

(WebCore::Layout::LayoutChildIteratorAdapter<T>::last const): Deleted.

  • layout/layouttree/LayoutIterator.h:

(WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren): Deleted.
(WebCore::Layout::Traversal::lastChild): Deleted.
(WebCore::Layout::Traversal::previousSibling): Deleted.
(WebCore::Layout::Traversal::findAncestorOfType): Deleted.
(WebCore::Layout::LayoutIterator<T>::traversePreviousSibling): Deleted.
(WebCore::Layout::LayoutIterator<T>::traverseAncestor): Deleted.

  • layout/layouttree/LayoutTreeBuilder.cpp:
7:41 AM Changeset in webkit [258842] by graouts@webkit.org
  • 8 edits in trunk/Source/WebCore

[Web Animations] Refactor cancelDeclarativeAnimationsForElement and willDestroyRendererForElement on AnimationTimeline
https://bugs.webkit.org/show_bug.cgi?id=209423

Reviewed by Antti Koivisto.

The methods cancelDeclarativeAnimationsForElement and willDestroyRendererForElement on AnimationTimeline did the same
thing save for the argument passed to WebAnimation::cancel(). We now refactor those two methods into a single
cancelDeclarativeAnimationsForElement method with an argument to set whether cancelation should be silent.
As a result, we also change WebAnimation::cancel() to have a single flavor instead of one without an argument and one
with the silent argument.

No test because there is no change in visible behavior.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::elementWasRemoved):
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
(WebCore::AnimationTimeline::willDestroyRendererForElement): Deleted.

  • animation/AnimationTimeline.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::cancel):

  • animation/DeclarativeAnimation.h:
  • animation/WebAnimation.cpp:
  • animation/WebAnimation.h:
  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::tearDownRenderers):

7:38 AM Changeset in webkit [258841] by Jacob Uphoff
  • 12 edits in trunk

Unreviewed, reverting r258803.

This revision caused many layout tests and 10 API tests to
start failing/crashing

Reverted changeset:

"[Cocoa] Deny access to database mapping service"
https://bugs.webkit.org/show_bug.cgi?id=209339
https://trac.webkit.org/changeset/258803

7:35 AM Changeset in webkit [258840] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

AudioTrackPrivateMediaStream recovers from a muted track very late
https://bugs.webkit.org/show_bug.cgi?id=209411

Reviewed by Eric Carlson.

In case of a muted track, the AudioSampleDataSource is not pushed any new sample.
When unmuting the tracks, pulled samples will be zeroes for some time until the newly pushed samples are used.
To fix this, we pause the audio player whenever muted/disabled/ended and restart playing when unmuted/enabled.
Manually tested.

  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):

7:33 AM Changeset in webkit [258839] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

AudioMediaStreamTrackRendererCocoa does not recover from AudioSession interruption
https://bugs.webkit.org/show_bug.cgi?id=209412

Reviewed by Eric Carlson.

In case there is an AudioSession interruption, like the app is in the background
and another app starts to play audio, AudioMediaStreamTrackRendererCocoa will not restart playing audio.
Fix this by clearing the AudioUnit when starting since the renderer is paused during the interruption.
This ensures resuming from the interruption in a clean state.

Manually tested.

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:

(WebCore::AudioMediaStreamTrackRendererCocoa::start):

7:26 AM Changeset in webkit [258838] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

RemoteAudioSession should listen to GPUProcess messages
https://bugs.webkit.org/show_bug.cgi?id=209422

Reviewed by Eric Carlson.

Make sure RemoteAudioSession is registered as a listener to GPUProcess messages.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):

7:24 AM Changeset in webkit [258837] by youenn@apple.com
  • 5 edits in trunk

MediaDevices::refreshDevices should take device type into account
https://bugs.webkit.org/show_bug.cgi?id=209417
<rdar://problem/60521332>

Reviewed by Eric Carlson.

Source/WebCore:

Now that we set deviceId to the empty string when media capture is not granted,
we can have two devices with the same ID. We also need to handle the device type.

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::refreshDevices):

LayoutTests:

  • fast/mediastream/media-device-info-expected.txt:
  • fast/mediastream/media-device-info.html:
7:22 AM Changeset in webkit [258836] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Box::establishesBlockFormattingContext should check isInitialContainingBlock
https://bugs.webkit.org/show_bug.cgi?id=209390
<rdar://problem/60735021>

Reviewed by Antti Koivisto.

It's more correct to call isInitialContainingBlock() to check if the current box is the ICB.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::initialContainingBlock const):

6:33 AM Changeset in webkit [258835] by Pablo Saavedra
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Check the cgroups memory limits (v1 and v2) to calculate the systemMemoryUsedAsPercentage() in the MemoryPressureMonitor
https://bugs.webkit.org/show_bug.cgi?id=209186

Reviewed by Carlos Alberto Lopez Perez.

Modifies the systemMemoryUsedAsPercentage() function adding the logic
to read the memory limits and the current memory used in the cgroup
associated to the WebKit process:

  • memory.memsw.usage_in_bytes (or memory.memsw.max in cgroupV2): current usage for memory+Swap
  • memory.limit_in_bytes (or memory.current in cgroupV2): limit of memory usage
  • memory.memsw.limit_in_bytes (or memory.max in cgroupV2): limit of memory+Swap usage

In case of the WK processes are associated to a cgroup with memory
controller, the function reads the memory.limit_in_bytes or
the memory.memsw.limit_in_bytes and the and memory.usage_in_bytes
from the cgroup mount point and calculates the percentage of
memory used.

In other cases (no cgroup memory controller associated or limits
higher than the real memory available), the function will return the
percentage based on the real memory available and real total memory
in the system.

The logic supports supports both cgroupV1 and cgroupV2

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::getMemoryTotalWithCgroup):
(WebKit::getMemoryUsageWithCgroup):
(WebKit::getCgroupController):
(WebKit::systemMemoryUsedAsPercentage):

5:41 AM Changeset in webkit [258834] by graouts@webkit.org
  • 6 edits in trunk/Source/WebCore

[Web Animations] ElementAnimationRareData is created too frequently
https://bugs.webkit.org/show_bug.cgi?id=209415

Reviewed by Antti Koivisto.

The various accessors on Element to access transitions and animations will ensure there is a backing
ElementAnimationRareData object. However, in a lot of cases, such as when we consider whether CSS
Transitions should be created, updated or removed under AnimationTimeline::updateCSSTransitionsForElement(),
we end up not needing to actually access the data structures on ElementAnimationRareData.

We now make the various methods on Element to access transitions and animations const T* and add ensure*()
methods to access the collections for modification. We also add methods to query whether there are running or
completed transitions at all or for a given property.

No test because there is no change in visible behavior.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::animationWasAddedToElement):
(WebCore::AnimationTimeline::animationWasRemovedFromElement):
(WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
(WebCore::AnimationTimeline::animationsForElement const):
(WebCore::AnimationTimeline::willDestroyRendererForElement):
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
(WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
(WebCore::AnimationTimeline::updateCSSTransitionsForElement):

  • animation/AnimationTimeline.h:
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::transitionDidComplete):

  • dom/Element.cpp:

(WebCore::Element::webAnimations const):
(WebCore::Element::cssAnimations const):
(WebCore::Element::transitions const):
(WebCore::Element::hasCompletedTransitionsForProperty const):
(WebCore::Element::hasRunningTransitionsForProperty const):
(WebCore::Element::hasRunningTransitions const):
(WebCore::Element::ensureWebAnimations):
(WebCore::Element::ensureCSSAnimations):
(WebCore::Element::ensureTransitions):
(WebCore::Element::ensureCompletedTransitionsByProperty):
(WebCore::Element::ensureRunningTransitionsByProperty):
(WebCore::Element::webAnimations): Deleted.
(WebCore::Element::cssAnimations): Deleted.
(WebCore::Element::transitions): Deleted.
(WebCore::Element::completedTransitionsByProperty): Deleted.
(WebCore::Element::runningTransitionsByProperty): Deleted.

  • dom/Element.h:
5:22 AM Changeset in webkit [258833] by Philippe Normand
  • 3 edits in trunk

[GTK][WPE] Disable systemd logging by default

Rubber-stamped by Žan Doberšek.

The logAlways logs are filling the journal way too fast currently,
specially on EWS running tests and buildbots. For the time being
disable logging until we figure out a better way to handle this.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
4:03 AM Changeset in webkit [258832] by cturner@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer] Fail gracefully in the absence of a WebVTT encoder.
https://bugs.webkit.org/show_bug.cgi?id=209290

Reviewed by Philippe Normand.

Covered by existing tests.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::initializeGStreamer): Gets rid of "plugin not found"
errors. It's not an error to have potentially broken AAC decoders,
but it's nice to give a clear warning.

  • platform/graphics/gstreamer/TextCombinerGStreamer.cpp:

(webkit_text_combiner_class_init):
(webkitTextCombinerNew): Check for the "subenc" *plugin*. This
check indirectly tells us the "webvttenc" *element* will exist.

3:57 AM Changeset in webkit [258831] by commit-queue@webkit.org
  • 5 edits in trunk/Source

[WPE] AsyncScrolling: horizontal scrolling is inverted
https://bugs.webkit.org/show_bug.cgi?id=208638

Source/WebCore:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-03-23
Reviewed by Adrian Perez de Castro.

Scrolling down should scroll to the right and up to the left..

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent): Invert also the x axis.

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent): Ditto.

Source/WebKit:

Patch by Chris Lord <Chris Lord> on 2020-03-23
Reviewed by Adrian Perez de Castro.

  • UIProcess/API/wpe/ScrollGestureController.cpp:

(WebKit::ScrollGestureController::handleEvent):

3:49 AM Changeset in webkit [258830] by Chris Lord
  • 2 edits in trunk/Tools

Add missing committer status to Chris Lord in contributors.json

Unreviewed

  • Scripts/webkitpy/common/config/contributors.json:
3:16 AM Changeset in webkit [258829] by youenn@apple.com
  • 6 edits in trunk/Source

Explicitly activate the new DrawingAreaProxy on PSON navigation
https://bugs.webkit.org/show_bug.cgi?id=209232

Reviewed by Antti Koivisto.

Delay tree unfreezing for provisional pages until the main frame load is committed.
At that point, UIProcess is made aware and is doing the process swap.
We can thus unfreeze the tree so that UIProcess starts getting DrawAreaProxy messages.

This allows UIProcess to start listening to DrawAreaProxy messages at the time of doing process swapping in WebPageProxy.

  • UIProcess/DrawingAreaProxy.cpp:

(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::startReceivingMessages):

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

(WebKit::WebPageProxy::setDrawingArea):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::didCommitLoad):

2:48 AM Changeset in webkit [258828] by youenn@apple.com
  • 5 edits in trunk

StringView::startsWith and String::startsWith do not treat null strings the same
https://bugs.webkit.org/show_bug.cgi?id=209273

Reviewed by Darin Adler.

Source/WTF:

Align StringImpl with StringView and make startsWith return true if prefix is null.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::startsWith const):

Tools:

  • TestWebKitAPI/Tests/WTF/StringView.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/WTFString.cpp:

(TestWebKitAPI::TEST):

2:05 AM Changeset in webkit [258827] by graouts@webkit.org
  • 6 edits in trunk/Source/WebCore

[Web Animations] Fix the typo for ElementAnimationRareData::completedTransitionByProperty()
https://bugs.webkit.org/show_bug.cgi?id=209413

Reviewed by Antti Koivisto.

There can be several completed transitions by property, so renaming this property to completedTransitionsByProperty.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
(WebCore::AnimationTimeline::updateCSSTransitionsForElement):

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::transitionDidComplete):

  • animation/ElementAnimationRareData.h:

(WebCore::ElementAnimationRareData::completedTransitionsByProperty):
(WebCore::ElementAnimationRareData::completedTransitionByProperty): Deleted.

  • dom/Element.cpp:

(WebCore::Element::completedTransitionsByProperty):
(WebCore::Element::completedTransitionByProperty): Deleted.

  • dom/Element.h:
1:17 AM Changeset in webkit [258826] by graouts@webkit.org
  • 12 edits
    3 adds in trunk

DocumentTimeline / CSSTransition objects are leaking on CNN.com
https://bugs.webkit.org/show_bug.cgi?id=208069
<rdar://problem/59680143>

Reviewed by Simon Fraser, Geoffrey Garen and Darin Adler.

Source/WebCore:

Test: webanimations/leak-css-animation.html

We add a test feature that lets use query the availability of a given WebAnimation by its "id" property in the WebAnimation::instances list.
We also fix some build issues that appeared with a change in UnifiedSources order.

  • animation/ElementAnimationRareData.cpp:

(WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup):

  • animation/ElementAnimationRareData.h:

(WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup): Deleted.

  • animation/WebAnimation.h:
  • testing/Internals.cpp:

(WebCore::Internals::animationWithIdExists const):

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

Source/WTF:

If a CSSAnimation is set on an element using the animation-name CSS property, and later removed, it will leak due to the ListHashSet<RefPtr<CSSAnimation>>
(aka CSSAnimationCollection) member on ElementAnimationRareData being replaced to the new list, but the old list not being cleared from its members.

We fix the ListHashSet assignment operator to use swap ensuring previously held items are cleared.

  • wtf/ListHashSet.h:

(WTF::=):

Tools:

Add a test that checks that a ListHashSet containing RefPtr<> types correctly calls the destructor for those items when the assignment operator is used.

  • TestWebKitAPI/Tests/WTF/ListHashSet.cpp:

(TestWebKitAPI::ListHashSetReferencedItem::create):
(TestWebKitAPI::ListHashSetReferencedItem::ListHashSetReferencedItem):
(TestWebKitAPI::ListHashSetReferencedItem::~ListHashSetReferencedItem):
(TestWebKitAPI::FakeElementAnimationRareData::FakeElementAnimationRareData):
(TestWebKitAPI::FakeElementAnimationRareData::~FakeElementAnimationRareData):
(TestWebKitAPI::FakeElementAnimationRareData::collection):
(TestWebKitAPI::FakeElementAnimationRareData::setCollection):
(TestWebKitAPI::TEST):

LayoutTests:

Add a test that checks that setting a CSSAnimation on an element, waiting a frame, and removing it will not leak that CSSAnimation.

  • webanimations/leak-css-animation-expected.txt: Added.
  • webanimations/leak-css-animation.html: Added.
  • webanimations/resources/css-animation-leak-iframe.html: Added.

Mar 22, 2020:

9:57 PM Changeset in webkit [258825] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Unreviewed, rename keepAlive to ensureStillAliveHere
https://bugs.webkit.org/show_bug.cgi?id=209398

Based on Geoff and Mark's feedback, renaming keepAlive to ensureStillAliveHere
to make the effect of keepAlive clear.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
(JSC::FTL::DFG::LowerDFGToB3::ensureStillAliveHere):
(JSC::FTL::DFG::LowerDFGToB3::keepAlive): Deleted.

  • heap/HeapCell.cpp:

(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.

  • heap/HeapCell.h:

(JSC::ensureStillAliveHere):
(JSC::HeapCell::use const):
(JSC::keepAlive): Deleted.

  • runtime/JSCJSValue.cpp:

(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.

  • runtime/JSCJSValue.h:

(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

5:40 PM Changeset in webkit [258824] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Add JSC::keepAlive(JSValue)
https://bugs.webkit.org/show_bug.cgi?id=209398

Reviewed by Mark Lam.

Add JSC::keepAlive(JSValue). This is useful to make some JSValue variable alive from GC.

  • heap/HeapCell.cpp:
  • runtime/JSCJSValue.cpp:

(JSC::keepAlive):

  • runtime/JSCJSValue.h:

(JSC::keepAlive):

3:57 PM Changeset in webkit [258823] by commit-queue@webkit.org
  • 5 edits in trunk

[ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209239
<rdar://problem/60591358>

Patch by Antoine Quint <Antoine Quint> on 2020-03-22
Reviewed by Simon Fraser.

Source/WebCore:

This test was made flaky by r257417, the initial fix for webkit.org/b/208069. A new, appropriate fix for that bug is in the works. In the
meantime we revert r257417 in this patch.

The reason this test became flaky is that it features the following code:

animB.timeline = new DocumentTimeline({

originTime:

document.timeline.currentTime - 100 * MS_PER_SEC - animB.startTime,

});

In this case the only reference to the created DocumentTimeline is through animB.timeline. But because r257417 made the timeline reference from
WebAnimation a weak reference, in some cases, if GC kicks in, the timeline would be dereferenced and the test would fail. We restore that relationship
to its previous state, which is a strong reference.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::setTimelineInternal):
(WebCore::WebAnimation::enqueueAnimationEvent):
(WebCore::WebAnimation::acceleratedStateDidChange):
(WebCore::WebAnimation::timeline const): Deleted.

  • animation/WebAnimation.h:

(WebCore::WebAnimation::timeline const):

LayoutTests:

  • platform/mac/TestExpectations:
1:33 PM Changeset in webkit [258822] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

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

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
12:29 PM Changeset in webkit [258821] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

Adopt -[UIWindowScene interfaceOrientation] when determining device orientation
https://bugs.webkit.org/show_bug.cgi?id=209372
<rdar://problem/60491857>

Reviewed by Darin Adler.

Currently, for WebKit clients that have adopted the UIScene lifecycle (and also do not set an interface
orientation override, like MobileSafari does), device orientation APIs will always report that the device is in
portrait mode, regardless of the actual device orientation. This is because our current mechanism for tracking
device orientation asks the shared UIApplication for its -statusBarOrientation. This is hard-coded to always
return UIInterfaceOrientationPortrait for apps that adopt the UIScene lifecycle, and will additionally trigger a
simulated crash, explaining that it is invalid for any scene-based app to call -statusBarOrientation.

To fix this, we adjust the deviceOrientation helper in WKWebViewIOS.mm to work for scene-based apps. See below
for more details.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _setupScrollAndContentViews]):

Change call sites of deviceOrientation() to be [self _deviceOrientation] instead.

(-[WKWebView _deviceOrientation]):

Replace deviceOrientation() with a _deviceOrientation helper method on WKWebView. For non-scene-based
apps, this new helper method does not change any behavior, and continues to go through UIApplication. However,
for scene-based apps, we instead ask the web view's window's UIWindowScene for its interface orientation.

Importantly, this means that if a WKWebView is not parented, it doesn't have a valid device orientation (i.e.
the orientation is UIInterfaceOrientationUnknown). As such, a newly created WKWebView that is unparented will
start out with no orientation; it's only upon moving the view into a window that it is able to determine the
device orientation. To ensure this, we add logic to -didMoveToWindow to recompute device orientation and
dispatch an update if needed.

To avoid sending unnecessary updates, if a WKWebView is unparented, we wait until it's parented again to send
the new device orientation.

(-[WKWebView didMoveToWindow]):
(-[WKWebView _windowDidRotate:]):
(deviceOrientation): Deleted.

See -[WKWebView _deviceOrientation] above.

10:41 AM Changeset in webkit [258820] by Alan Bujtas
  • 9 edits
    2 copies in trunk/Source/WebCore

[LFC] Introduce InitialContainingBox class
https://bugs.webkit.org/show_bug.cgi?id=209399
<rdar://problem/60741767>

Reviewed by Antti Koivisto.

ICB is the top level containing block. This helps to make sure we don't accidentally call parent() on the ICB.
This is also a preparation for "const Box& Layout::Box::parent()".

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::BoxTree):
(): Deleted.

  • layout/integration/LayoutIntegrationBoxTree.h:

(WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
(WebCore::LayoutIntegration::BoxTree::rootLayoutBox):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isInitialContainingBlock const): Deleted.

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isInitialContainingBlock const):

  • layout/layouttree/LayoutContainerBox.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildLayoutTree):

7:02 AM Changeset in webkit [258819] by Alan Bujtas
  • 16 edits in trunk/Source/WebCore

[LFC] Layout::Box::containingBlock should return a const ContainerBox&
https://bugs.webkit.org/show_bug.cgi?id=209381
<rdar://problem/60732278>

Reviewed by Antti Koivisto.

Layout tree is immutable during layout, so every box should be able to return a valid containing block (except the ICB).
(This patch also removes the unused isDescendantOf() function and renames isDescendantOfFormattingRoot to isInFormattingContextOf).

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::isHeightAuto):
(WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
(WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors):
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
(WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
(WebCore::Layout::initialContainingBlock): Deleted.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):

  • layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):

  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::absoluteDisplayBox):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
(WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
(WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
(WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::bottom const):
(WebCore::Layout::FloatingState::top const):

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::FloatItem::isInFormattingContextOf const):
(WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const): Deleted.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::containingBlock const):
(WebCore::Layout::Box::formattingContextRoot const):
(WebCore::Layout::Box::isInFormattingContextOf const):
(WebCore::Layout::Box::isDescendantOf const): Deleted.
(WebCore::Layout::Box::isContainingBlockDescendantOf const): Deleted.

  • layout/layouttree/LayoutBox.h:
12:42 AM Changeset in webkit [258818] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: Right side of assignment cannot be destructured (at QuickConsole.js:358:30)
https://bugs.webkit.org/show_bug.cgi?id=209388

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/QuickConsole.js:

(WI.QuickConsole.prototype._handleFramePageExecutionContextChanged):

Mar 21, 2020:

10:02 PM Changeset in webkit [258817] by commit-queue@webkit.org
  • 8 edits
    1 copy
    1 move
    6 adds
    1 delete in trunk

An animated PNG plays the frames one time more than the image loopCount
https://bugs.webkit.org/show_bug.cgi?id=205640

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-21
Reviewed by Darin Adler.

Source/WebCore:

Make the repetitionCount calculation for GIFs different from it for other
image formats.

Tests: fast/images/animated-gif-loop-count.html

fast/images/animated-png-loop-count.html

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoderCG::repetitionCount const):

  • platform/graphics/cg/UTIRegistry.cpp:

(WebCore::isGIFImageType):

  • platform/graphics/cg/UTIRegistry.h:

LayoutTests:

Refactor the js code to a separate js file. Add two layout tests: one for
animated GIFs and the other for animated PNGs.

  • fast/images/animated-gif-loop-count-expected.html: Added.
  • fast/images/animated-gif-loop-count.html: Added.
  • fast/images/animated-image-loop-count-expected.html: Removed.
  • fast/images/animated-image-loop-count.html: Removed.
  • fast/images/animated-png-loop-count-expected.html: Added.
  • fast/images/animated-png-loop-count.html: Added.
  • fast/images/resources/animated-image-loop-count.js: Added.
  • fast/images/resources/animated-red-green-blue-repeat-1.png: Added.
  • fast/images/resources/animated-red-green-blue-repeat-2.png: Added.
  • fast/images/resources/animated-red-green-blue-repeat-infinite.png: Added.
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
9:59 PM Changeset in webkit [258816] by commit-queue@webkit.org
  • 3 edits in trunk

Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
https://bugs.webkit.org/show_bug.cgi?id=209251
<rdar://problem/60103614>

Patch by Jack Lee <Jack Lee> on 2020-03-21
Reviewed by Darin Adler.

Source/WebCore:

In this case, which is a valid scenario, we are looking for sibling of an AccessibilityRenderObject through the parent of its renderer, which happens to be of <RenderView>. Since <RenderView> has no parent, we need to skip calling isInlineWithContinuation with a null parent, by adding null check.

Test: fast/frames/iframe-empty-doc-crash.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::nextSibling const):

LayoutTests:

In this case, which is a valid scenario, we are looking for sibling of an AccessibilityRenderObject through the parent of its renderer, which happens to be of <RenderView>. Since <RenderView> has no parent, we need to skip calling isInlineWithContinuation with a null parent, by adding null check.

  • fast/frames/iframe-empty-doc-crash-expected.txt: Added.
  • fast/frames/iframe-empty-doc-crash.html: Added.
7:57 PM Changeset in webkit [258815] by Keith Rollin
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Set INSTALLHDRS_SCRIPT_PHASE in ANGLE builds
https://bugs.webkit.org/show_bug.cgi?id=209384
<rdar://problem/59513380>

Reviewed by Dan Bernstein.

Production ANGLE builds are technically non-compliant. During the
installhdrs build action, ANGLE headers are exported but are not
post-processed. This differs from the install build action, where the
exported headers *are* post-processed. The headers need to be treated
identically under both actions. The post-processing is enabled by
setting the INSTALLHDRS_SCRIPT_PHASE build setting to YES. Most other
WebKit projects already set this setting (see, for example,
https://trac.webkit.org/changeset/155787,
https://trac.webkit.org/changeset/110327, and
https://trac.webkit.org/changeset/41417).

  • Configurations/ANGLE.xcconfig:
6:31 PM Changeset in webkit [258814] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

decodeSharedBuffer() in WebCoreArgumentCoders.cpp should validate bufferSize
<https://webkit.org/b/209373>
<rdar://problem/60610919>

Reviewed by Darin Adler.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::decodeSharedBuffer):

  • Return early if bufferSize is too big.
12:10 PM Changeset in webkit [258813] by Simon Fraser
  • 2 edits in trunk/LayoutTests

LayoutTest fast/scrolling/scroll-container-horizontally.html frequently times out & fails
https://bugs.webkit.org/show_bug.cgi?id=158237

Unreviewed test gardening.

No longer flaky after r258679.

  • platform/mac-wk2/TestExpectations:
11:56 AM Changeset in webkit [258812] by Simon Fraser
  • 2 edits in trunk/LayoutTests

[ Mac wk2 ] tiled-drawing/simple-document-with-margin-tiles.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207518

Unreviewed test gardening.

No longer flaky after r258679.

  • platform/mac-wk2/TestExpectations:
11:52 AM Changeset in webkit [258811] by Simon Fraser
  • 2 edits in trunk/LayoutTests

[ Mac wk2 ] tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=208471

Unreviewed test gardening.

No longer flaky after r258679.

  • platform/mac-wk2/TestExpectations:
11:29 AM Changeset in webkit [258810] by Simon Fraser
  • 2 edits in trunk/LayoutTests

[ Mac wk2 ] fast/scrolling/momentum-scroll-with-borders.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209013

Unreviewed test fixing. This test needs to send the "end" event for the momentum phase
for WheelEventTestMonitor to work correctly.

  • fast/scrolling/momentum-scroll-with-borders.html:
11:06 AM Changeset in webkit [258809] by Devin Rousso
  • 22 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r257380, r257759): focusing the inspected page when docked dims most of the interface
https://bugs.webkit.org/show_bug.cgi?id=209366

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ButtonNavigationItem.css:

(body.window-inactive .navigation-bar .item.button > img): Added.
(body.window-inactive .navigation-bar .item.button.disabled > img): Added.
(body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button > img): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button.disabled > img): Deleted.

  • UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:

(body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker): Added.
(body:matches(.window-inactive, .window-docked-inactive) .timeline-overview-graph.rendering-frame > .frame-marker): Deleted.

  • UserInterface/Views/TabBar.css:

(body:not(.docked).window-inactive .tab-bar): Added.
(body.docked.window-inactive .tab-bar): Added.
(body.window-inactive .tab-bar > .border): Added.
(body.window-inactive .tab-bar > .navigation-bar > .item.divider): Added.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item): Added.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.window-inactive .tab-bar > .tabs > .item > .icon): Added.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .icon): Added.
(body.window-inactive .tab-bar > .tabs > .item > .title): Added.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .title): Added.
(body:not(.docked).window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked).window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked).window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
(body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .border): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .navigation-bar > .item.divider): Deleted.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Deleted.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item > .icon): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected > .icon): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item > .title): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.

  • UserInterface/Views/TimelineRecordFrame.css:

(body.window-inactive .timeline-record-frame.selected): Added.
(body:matches(.window-inactive, .window-docked-inactive) .timeline-record-frame.selected): Deleted.

  • UserInterface/Views/TimelineRuler.css:

(body.window-inactive .timeline-ruler > .header > .divider): Added.
(body:matches(.window-inactive, .window-docked-inactive) .timeline-ruler > .header > .divider): Deleted.

  • UserInterface/Views/Variables.css:

(body.window-inactive): Added.
(body.window-inactive *): Added.
(@media (prefers-color-scheme: dark) body.window-inactive): Added.
(@media (prefers-color-scheme: dark) body.window-inactive *): Added.
(body:matches(.window-inactive, .window-docked-inactive)): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) *): Deleted.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive)): Deleted.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive) *): Deleted.
Remove usage of .window-docked-inactive as we don't want the UI to change when the focus
switches between the inspected page and the docked Web Inspector area, which happens a lot.

  • UserInterface/Views/BreakpointTreeElement.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.breakpoint.selected .status > .status-image.resolved): Added.
(.tree-outline:focus .item.breakpoint.selected .status > .status-image.resolved): Deleted.

  • UserInterface/Views/CallFrameTreeElement.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.call-frame.selected .status > .status-image): Added.
(.tree-outline:focus .item.call-frame.selected .status > .status-image): Deleted.

  • UserInterface/Views/CanvasSidebarPanel.css:

(body:not(.window-inactive, .window-docked-inactive) .sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline:focus-within .item.processing.selected .subtitle > progress): Added.
(.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline:focus .item.processing.selected .subtitle > progress): Deleted.

  • UserInterface/Views/DOMTreeContentView.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom-tree:focus-within .tree-outline.dom li:matches(.selected, .hovered) .status-image.breakpoint): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom-tree:focus-within .tree-outline.dom li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added.
(body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Deleted.

  • UserInterface/Views/DOMTreeOutline.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:not(.non-selectable):focus-within li.selected .selection-area): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.inspected-node.selected > span::after): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .pseudo-class-indicator): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected *): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.parent.selected::before): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.parent.expanded.selected::before): Added.
(.tree-outline.dom:not(.non-selectable):focus-within li.selected .selection-area): Deleted.
(.tree-outline.dom:focus-within li.inspected-node.selected > span::after): Deleted.
(.tree-outline.dom:focus-within li.selected .pseudo-class-indicator): Deleted.
(.tree-outline.dom:focus-within li.selected): Deleted.
(.tree-outline.dom:focus-within li.selected *): Deleted.
(.tree-outline.dom:focus-within li.parent.selected::before): Deleted.
(.tree-outline.dom:focus-within li.parent.expanded.selected::before): Deleted.

  • UserInterface/Views/Main.css:

(:focus .selected .go-to-arrow, .selected:focus .go-to-arrow): Added.
(:focus .selected .go-to-arrow:active, .selected .go:focus-to-arrow:active): Added.
(@media (prefers-color-scheme: dark) :focus .selected .go-to-arrow, .selected:focus .go-to-arrow): Added.
(:focus .selected .go-to-arrow): Deleted.
(:focus .selected .go-to-arrow:active): Deleted.
(@media (prefers-color-scheme: dark) :focus .selected .go-to-arrow): Deleted.

  • UserInterface/Views/RecordingActionTreeElement.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected > .titles .parameter.swizzled, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected::before): Added.
(.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus .item.recording-action.selected > .titles .parameter.swizzled, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus .item.recording-action.selected::before): Deleted.

  • UserInterface/Views/ResourceTreeElement.css:

(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open, .tree-outline:not(:focus-within) .item.resource.resource-type-websocket.selected .status .ready-state.open, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.open): Added.
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting, .tree-outline:not(:focus-within) .item.resource.resource-type-websocket.selected .status .ready-state.connecting, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.connecting): Added.
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open, .tree-outline:not(:focus) .item.resource.resource-type-websocket.selected .status .ready-state.open, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.open): Deleted.
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting, .tree-outline:not(:focus) .item.resource.resource-type-websocket.selected .status .ready-state.connecting, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.connecting): Deleted.

  • UserInterface/Views/ScriptDetailsTimelineView.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected .alternate-subtitle): Added.
(.tree-outline:focus .item.selected .alternate-subtitle): Deleted.

  • UserInterface/Views/SourceCodeTreeElement.css:

(.tree-outline .item .status > .toggle-script-blackbox, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected .status > .toggle-script-blackbox.pattern-blackboxed): Added.
(.tree-outline .item .status > .toggle-script-blackbox, .tree-outline:focus .item.selected .status > .toggle-script-blackbox.pattern-blackboxed): Deleted.

  • UserInterface/Views/ThreadTreeElement.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within > .item.thread.selected .status-button.resume): Added.
(.tree-outline:focus > .item.thread.selected .status-button.resume): Deleted.

  • UserInterface/Views/TimelineOverview.css:

(.timeline-overview > .tree-outline.timelines .item.selected + .item): Added.
(body:not(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines:focus-within .item.selected + .item): Added.
(@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item): Added.
(.timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
(.timeline-overview > .tree-outline.timelines :focus .item.selected + .item): Deleted.
(@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.

  • UserInterface/Views/TreeElementStatusButton.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected > .status > .status-button): Added.
(:focus .item.selected > .status > .status-button): Deleted.
Fix cases where :focus was still being checked from the WI.TreeOutline instead of the
individual WI.TreeElement. We should be using :focus-within, but only if the window or
docked Web Inspector area is also focused.

10:01 AM WebKitGTK/2.28.x edited by Michael Catanzaro
Propose r258328/r258808 (diff)
8:22 AM Changeset in webkit [258808] by commit-queue@webkit.org
  • 4 edits in trunk

[GTK] Use ${PYTHON_EXECUTABLE} to run generate-gtkdoc
https://bugs.webkit.org/show_bug.cgi?id=208970

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-03-21
Reviewed by Konstantin Tokarev.

.:

There's no need to rely on shebangs when executing python scripts from CMake. This should
ensure the script always works even if the shebang does not.

  • Source/cmake/GtkDoc.cmake:

Tools:

We are allowed to use /usr/bin/env in this script because it's not installed (so not
packaged). Therefore we can make the shebang compatible with FreeBSD in this particularl
case.

  • gtkdoc/generate-gtkdoc:
7:25 AM Changeset in webkit [258807] by Philippe Normand
  • 4 edits in trunk/Source/WebCore

Make the MediaSample::toJSONString method generic
https://bugs.webkit.org/show_bug.cgi?id=209287

Reviewed by Eric Carlson.

It is generic and thus can be shared to sub-classes.

  • platform/MediaSample.h:

(WebCore::MediaSample::toJSONString const):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
7:11 AM Changeset in webkit [258806] by Alan Bujtas
  • 4 edits
    2 adds in trunk

telerik.com: Placeholder text is misaligned in search text box
https://bugs.webkit.org/show_bug.cgi?id=209371
<rdar://problem/45945564>

Reviewed by Antti Koivisto.

Source/WebCore:

Let the placeholder box do its own vertical positioning/sizing.
The placeholder box's height is currently set to the height of the editable renderer (sibling box), so when the ::placeholder has
a large font-size set, the text is oddly positioned and gets cut off (the placeholder box has 'overflow: hidden' UA style).
This patch makes the placeholder box center aligned and sized based on the used size (matches both Chrome and FF).

Test: fast/forms/placeholder-content-center.html

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):

LayoutTests:

  • fast/forms/placeholder-content-center-expected.html: Added.
  • fast/forms/placeholder-content-center.html: Added.

Mar 20, 2020:

10:54 PM Changeset in webkit [258805] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

REGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html is failing and timing out
https://bugs.webkit.org/show_bug.cgi?id=209299

Reviewed by Daniel Bates.

fast/scrolling/arrow-key-scroll-in-rtl-document.html is unusual in that it uses monitorWheelEvents()
but then issues arrow key presses.

WebCore responds to arrow keys via WebEditorClient::handleKeyboardEvent() calling down into
WebPage::scroll() which ends up in FrameView::requestScrollPositionUpdate() and bounces to the
scrolling thread. This isn't tracked by existing 'defer' reasons on WheelEventTestMonitor, so add a
new defer reason that covers the period for adding the requested scroll go the scrolling state tree,
and responding to it in the scrolling thread.

  • page/WheelEventTestMonitor.cpp:

(WebCore::operator<<):

  • page/WheelEventTestMonitor.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):

  • page/scrolling/ThreadedScrollingTree.h:
7:42 PM Changeset in webkit [258804] by Wenson Hsieh
  • 6 edits in trunk

[iPadOS] Yahoo! search results are sometimes zoomed in a little
https://bugs.webkit.org/show_bug.cgi?id=209356
<rdar://problem/60563952>

Reviewed by Tim Horton.

Source/WebKit:

When the web content process uses WebPage::scalePage() to modify the viewport scale (e.g. after a viewport
configuration change) on iOS, it's possible for this new scale to be replaced by a previous scale when
dispatching the next visible content rect update. Consider the following scenario:

  1. A remote layer tree transaction is sent to the UI process containing scale a.
  2. WebPage::scalePage is called with a scale b.
  3. A visible content rect update with scale a is scheduled, sent to the web process and dispatched.
  4. The page scale reverts to a.

This bug exercises the above scenario: the Yahoo search results page specifies a responsive viewport
(device-width and scale=1), but proceeds to lay out outside of the bounds of the device width. As such, after
the document finishes parsing, we attempt to shrink the page to fit; however, if this shrinking happens after
a remote layer tree transaction with the old scale but before the next visible content rect update containing
that old scale, we will end up reverting to this old scale instead of the scale after shrinking to fit. This
same bug is present when using setViewScale, which was exercised by the flaky test below, since the new scale
after the viewport configuration change may be overridden by an incoming visible content rect update.

To fix this, we add a mechanism to detect when the page scale has been changed by the web process (e.g. after a
viewport change) and remember the last committed layer tree identifier at that moment. Later, if we get a
visible content rect update with a layer tree commit identifier equal to (or older than) the layer tree commit
identifier when we changed the page scale, don't set the page scale factor using this incoming scale; instead,
wait for the next visible content rect update (which will contain the new scale).

Fixes an existing flaky test: fast/viewport/ios/device-width-viewport-after-changing-view-scale.html

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::close):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::platformDidScalePage):

Add a platform hook that is invoked after scaling the page via scalePage. See below for the iOS version.

(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::didFinishDocumentLoad):
(WebKit::WebPage::didFinishLoad):

Drive-by fix: remove an unnecessary UNUSED_PARAM. Also, replace calls to schedule the shrink to fit content
timer with a call to shrinkToFitContent instead.

  • WebProcess/WebPage/WebPage.h:

Add a member variable to remember the last sent layer tree commit ID and page scale, when we last changed the
page scale via the web process. This is set in platformDidScalePage below.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::shrinkToFitContent):

Refactor this to not return a bool, but instead call viewportConfigurationChanged at the end if the viewport
actually changed.

(WebKit::WebPage::updateVisibleContentRects):

Ignore the incoming page scale when updating visible content rects if it:

  1. Is the same as the last page scale we sent via layer tree commit.
  2. After sending the above scale, we've since adjusted the page scale such that it is no longer the same.

(WebKit::WebPage::platformDidScalePage):

Update m_lastLayerTreeTransactionIdAndPageScaleBeforeScalingPage.

(WebKit::WebPage::scheduleShrinkToFitContent): Deleted.
(WebKit::WebPage::shrinkToFitContentTimerFired): Deleted.

Remove the zero-delay timer before running the shrink-to-fit heuristic, and just call shrinkToFitContent
directly. This was a source of flakiness when trying to reproduce the bug, and doesn't seem to serve any
purpose since we shrink-to-fit after dispatching the "DOMContentLoaded" and "load" events anyways.

(WebKit::WebPage::immediatelyShrinkToFitContent): Deleted.

LayoutTests:

Remove failing expectations for fast/viewport/ios/device-width-viewport-after-changing-view-scale.html.

  • platform/ios-wk2/TestExpectations:
6:10 PM Changeset in webkit [258803] by pvollan@apple.com
  • 12 edits in trunk

[Cocoa] Deny access to database mapping service
https://bugs.webkit.org/show_bug.cgi?id=209339
Source/WebKit:

<rdar://problem/56966010>

Reviewed by Brent Fulgham.

In order for the WebContent process to not have permantent access to the database mapping service,
this patch creates an extension for the service in the UI process, sends it to the WebContent
process, where it is consumed. Then, an API call is made which will map the database, and next the
WebContent process will revoke the extension. The WebContent process has then mapped the database,
and access to the database mapping service is no longer needed.

Tested by: 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/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

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

Source/WTF:

<rdar://problem/56966010>

Reviewed by Brent Fulgham.

Disable the use of UTTypeRecord swizzling, since this is not needed with the new approach
of denying the database mapping service in this patch.

  • wtf/PlatformUse.h:

LayoutTests:

Reviewed by Brent Fulgham.

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
5:52 PM Changeset in webkit [258802] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=209003
<rdar://problem/60376722>

Reviewed by Brent Fulgham.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
5:38 PM Changeset in webkit [258801] by Ross Kirsling
  • 7 edits in trunk

hasObservableSideEffectsForRegExpSplit doesn't check for @@match override
https://bugs.webkit.org/show_bug.cgi?id=209363

Reviewed by Michael Saboff.

JSTests:

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

Our RegExp.prototype[@@split] implementation has a fast path for unadultered RegExp objects,
but we're using that fast path even when @@match has been overridden.

This is illegitimate because the RegExp species constructor calls IsRegExp, which hits the @@match getter.

  • builtins/BuiltinNames.h:
  • builtins/RegExpPrototype.js:

(globalPrivate.hasObservableSideEffectsForRegExpSplit):

  • bytecode/LinkTimeConstant.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

5:27 PM Changeset in webkit [258800] by Jonathan Bedard
  • 2 edits in trunk/Tools

run-webkit-tests: Report MacCatalyst as a unique platform
https://bugs.webkit.org/show_bug.cgi?id=209361

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/port/mac.py:

(MacCatalystPort):
(MacCatalystPort.configuration_for_upload): Treat MacCatalyst as a separate platform from Mac.

4:52 PM Changeset in webkit [258799] by ddkilzer@apple.com
  • 5 edits
    2 adds in trunk

Content-Type & Nosniff Ignored on XML External Entity Resources
<https://webkit.org/b/191171>
<rdar://problem/45763222>

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.

  • platform/MIMETypeRegistry.h:

(WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.

  • Checks for XML external entity MIME types.
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::externalEntityMimeTypeAllowedByNosniff): Add.

  • Checks whether the MIME type is valid based on the presence of the "X-Content-Type-Options: nosniff" header.

(WebCore::openFunc):

  • Drop the contents of the resource that was returned and print an error message to the Web Inspector console if externalEntityMimeTypeAllowedByNosniff() says the MIME type is not allowed.

LayoutTests:

  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt: Add.
  • http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml: Add.
4:24 PM Changeset in webkit [258798] by achristensen@apple.com
  • 5 edits in trunk

CORS-disabling SPI introduced in r253978 should make responses non-opaque
https://bugs.webkit.org/show_bug.cgi?id=209351
<rdar://problem/60024850>

Reviewed by Chris Dumez.

Source/WebCore:

Covered by making the API test actually check that response content is readable.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::responseReceived):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
3:56 PM Changeset in webkit [258797] by sihui_liu@apple.com
  • 3 edits in trunk/LayoutTests

REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318
<rdar://problem/60657081>

Unreviewed test gardening after r258768.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
3:45 PM Changeset in webkit [258796] by dbates@webkit.org
  • 8 edits in trunk/Source/WebKit

Have insertDictatedTextAsync() take an InsertTextOptions
https://bugs.webkit.org/show_bug.cgi?id=209308
<rdar://problem/60652838>

Reviewed by Darin Adler.

This will provide future extensibility, which I plan to make use of in a subsequent patch,
in addition to making the interface for insertDictatedTextAsync() more like insertTextAsync().

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::insertDictatedTextAsync): Pass the options through. The caller is now
responsible for setting the registerUndoGroup insertion option.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::insertText): Stack-allocate a InsertTextOptions setting its registerUndoGroup
field and pass this object through.

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

(-[WKContentView insertText:alternatives:style:]): Pass the default constructed InsertTextOptions,
which defaults registerUndoGroup to false to keep the current behavior.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::insertDictatedTextAsync): Write in terms of InsertTextOptions.registerUndoGroup.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
3:36 PM Changeset in webkit [258795] by jer.noble@apple.com
  • 4 edits in trunk/Source

Ensure media cache directory is created before passing to AVURLAsset.
https://bugs.webkit.org/show_bug.cgi?id=209341

Reviewed by Eric Carlson.

Source/WebCore:

Sandbox changes require the media cache directory to be created before passing to
AVFoundation, to ensure that a sandbox extension is allowed to be created for that
directory.

When the mediaCacheDirectory is empty or null, no longer specify a temporary directory. This
allows clients to disable caching by specifying an empty string for the cache directory.
Since now assetCacheForPath() can return nil, update all the call sites to handle that
possibility. Add a new method, ensureAssetCacheExistsAtPath() which tries to create a
directory at the specified path, and returns nil if that is not possible. This ensures the
cache path exists before adding the AVAssetCache to the AVURLAsset options dictionary.

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

(WebCore::assetCacheForPath):
(WebCore::ensureAssetCacheExistsForPath):
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

Source/WebKitLegacy/mac:

MediaPlayerPrivateAVFoundaionObjC will no longer create an asset cache in a temporary
directory by default; ensure that it's media cache directory is set during initialization.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

3:31 PM Changeset in webkit [258794] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] animations/animation-direction-reverse.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=209362

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:27 PM Changeset in webkit [258793] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

Update imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict,normal}-015.xht
https://bugs.webkit.org/show_bug.cgi?id=209250

Fixing test expectations.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:55 PM Changeset in webkit [258792] by dbates@webkit.org
  • 6 edits in trunk/Source/WebKit

Replace "deferred element focus" functionality with alternative solution
https://bugs.webkit.org/show_bug.cgi?id=201608

Reviewed by Wenson Hsieh.

This is a partial revert of r190278. Have the web process perform a layout, if needed, when
computing focus element information and send an editor state update immediately. If layout is
not needed then explicitly schedule a full editor state update.

Currently, fetching focus element information neither sends an editor state update nor
schedules one. As a result, when the web process tells the UI process to focus an element the
UI process may need to defer doing so if the last received update did not include details
that require up-to-date layout (e.g. the bounding rect of the focused element, which is used
to scroll and zoom to center the focused element). The UI process then schedules an async message
to the web process to fetch the full editor state, which will arrive in a layer tree commit message
from the web process. (Note that the UI process schedules this request to ensure the web process
knows that it is waiting for a layer tree commit. The web process can use this info to expedite
a layer tree commit, if needed). This deferral mechanism complicates the element focusing and
defocusing logic in the UI process and prevents fixing <https://bugs.webkit.org/show_bug.cgi?id=199960>.
Instead remove this deferral concept and have the web process ensure that a full editor state
update is sent or will be sent when computing the focus element information.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetStateAfterProcessExited):

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

(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::elementDidFocus):
(WebKit::WebPageProxy::elementDidBlur):
Remove bookkeeping code to track a deferred focus event or to perform the deferred event
on layer tree commit.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidFocus):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getFocusedElementInformation): Save off whether a layout is needed then
tell the page to layout if needed. If a layout was needed then send an editor state update
immediately (it's an async message): this update will be a "full editor state" update that
includes up-to-date layout details. Otherwise, schedule a full editor state update. While I
am here, I updated the code to take out a ref on the focused frame's document before performing
a layout because layout can cause arbitrary JavaScript execution that could detach the document
from its frame view as part of destroying the document. Document destruction is detected by
checking whether the document has been detached from its frame view. If this happens then
bail out as there is no need to get focus element info.

2:54 PM Changeset in webkit [258791] by ajuma@chromium.org
  • 1 edit
    1 add in trunk/LayoutTests

Intersection Observer intersections are wrong with zooming
https://bugs.webkit.org/show_bug.cgi?id=209264

Unreviewed test gardening.

Add an expected.txt file that was accidentally omitted in r258787.

  • intersection-observer/root-margin-with-zoom-expected.txt: Added.
2:38 PM Changeset in webkit [258790] by aakash_jain@apple.com
  • 6 edits in trunk/Tools

commit-queue should skip building and testing if patch already passed tests on mac-wk2 queue
https://bugs.webkit.org/show_bug.cgi?id=208938

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(RunWebKitTests.doStepIf): Skip testing if patch already passed mac-wk2 tests.
(CheckPatchStatusOnEWSQueues): Build-step to check patch status on other queues.
(CheckPatchStatusOnEWSQueues.get_patch_status):
(CheckPatchStatusOnEWSQueues.start):

  • BuildSlaveSupport/ews-build/steps_unittest.py:

(test_skip_for_mac_wk2_passed_patch_on_commit_queue): Added unit-tests.

  • BuildSlaveSupport/ews-build/factories.py: Added build-step to check the patch status on other queues.
  • BuildSlaveSupport/ews-build/factories_unittest.py: Updated unit-test.
  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Added the new step status to STEPS_TO_HIDE.
2:21 PM Changeset in webkit [258789] by ddkilzer@apple.com
  • 8 edits in trunk

Fix name of "X-Content-Type:" HTTP header in console logging
<https://webkit.org/b/209348>

Reviewed by Devin Rousso.

Source/WebCore:

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet):

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::validateWorkerResponse):

  • Change "X-Content-Type:" to "X-Content-Type-Options:" to fix the name of the header.

LayoutTests:

  • http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked-expected.txt:
  • http/tests/security/contentTypeOptions/nosniff-script-blocked-expected.txt:
  • http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked-expected.txt:
  • Update test results for the correct name of the header: "X-Content-Type-Options:".
2:15 PM Changeset in webkit [258788] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/WebCore

Cherry-pick r258267. rdar://problem/60703602

Consolidate detachment of document timeline into Document::commonTeardown.
https://bugs.webkit.org/show_bug.cgi?id=208786
<rdar://problem/59936716>

Patch by Jack Lee <Jack Lee> on 2020-03-11
Reviewed by Ryosuke Niwa.

Move detachment of DocumentTimeline to Document::commonTeardown().

No new tests. Covered by existing document tests.

  • dom/Document.cpp: (WebCore::Document::removedLastRef): (WebCore::Document::commonTeardown): (WebCore::Document::prepareForDestruction):

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

1:58 PM Changeset in webkit [258787] by ajuma@chromium.org
  • 3 edits
    1 add in trunk

Intersection Observer intersections are wrong with zooming
https://bugs.webkit.org/show_bug.cgi?id=209264

Reviewed by Simon Fraser.

Source/WebCore:

An IntersectionObserver's rootMargin is expressed in CSS pixels,
but we weren't accounting for page zoom. Fix this by multiplying
the root margin by the zoom factor.

Test: intersection-observer/root-margin-with-zoom.html

  • dom/Document.cpp:

(WebCore::expandRootBoundsWithRootMargin):
(WebCore::computeIntersectionState):

LayoutTests:

  • intersection-observer/root-margin-with-zoom.html: Added.
1:44 PM Changeset in webkit [258786] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Better organize patch status api data
https://bugs.webkit.org/show_bug.cgi?id=209342

Reviewed by Jonathan Bedard.

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

(Status._build_status):
(Status._build_statuses_for_patch): Updated to return dictionary instead of list.
(Status.get): Remove safe=false now that we are returning a dictionary.

1:40 PM Changeset in webkit [258785] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION: (r258747) [ Mac wk1 Release ] media/video-background-tab-playback.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=209353

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:34 PM Changeset in webkit [258784] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Add correct annotations to block isa pointer
https://bugs.webkit.org/show_bug.cgi?id=209355
<rdar://problem/60431606>

Patch by Oliver Hunt <oliver@nerget,com> on 2020-03-20
Reviewed by Keith Miller.

Trivial definition update.

  • wtf/BlockPtr.h:

(WTF::BlockPtr<R):

1:19 PM Changeset in webkit [258783] by Ross Kirsling
  • 4 edits in trunk

RegExp.prototype[@@replace] doesn't coerce result index to integer
https://bugs.webkit.org/show_bug.cgi?id=209323

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml:

Mark six test cases as passing.

Source/JavaScriptCore:

From https://tc39.es/ecma262/#sec-regexp.prototype-@@replace:

21.2.5.10 RegExp.prototype [ @@replace ] ( string, replaceValue )

...

  1. For each result in results, do ...
    1. Let position be ? ToInteger(? Get(result, "index")).
    2. Set position to max(min(position, lengthS), 0).

result.index may be undefined, so it doesn't suffice to coerce it with comparison operators.

  • builtins/RegExpPrototype.js:
1:16 PM Changeset in webkit [258782] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Improve the previous build fix.

  • WebCoreSupport/WebFrameLoaderClient.mm:

Darin points out that we have USE(WEB_THREAD), so might as well use it!

1:04 PM Changeset in webkit [258781] by don.olmstead@sony.com
  • 9 edits in trunk/Source

[GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
https://bugs.webkit.org/show_bug.cgi?id=208963

Reviewed by Eric Carlson.

Source/WebCore:

Add a PlatformLayerContainer definition for use within the GPU Process code.
Migrate to using over typedef in the file.

  • platform/graphics/PlatformLayer.h:

Source/WebKit:

Use PlatformLayerContainer since RetainPtr is a Cocoa only construct. This
allows non-Cocoa ports to get further with compiling out the GPU Process.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/VideoLayerRemote.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:

(WebKit::MediaPlayerPrivateRemote::createVideoFullscreenLayer):

  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:

(WebKit::createVideoLayerRemote):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
12:56 PM Changeset in webkit [258780] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

Isolated tree updates must happen after AXObject has finished handling notifications.
https://bugs.webkit.org/show_bug.cgi?id=209354

Reviewed by Chris Fleizach.

Isolated tree updates were happening in AXObjectCache::postNotification,
but that is too early because the AXObject tree is updated during
notificationPostTimerFired. Thus, moved the updates to after all
AXObject tree updates have been done.
In addition, fixed the check for replacement of the IsolatedObject in
AXIsolatedTree::applyPendingChanges, which now happens only if the old
and new objects have the same platform wrapper.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::postNotification):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::applyPendingChanges):

12:35 PM Changeset in webkit [258779] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209357

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:22 PM Changeset in webkit [258778] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r257835): close and undock buttons are shown in remote inspector
https://bugs.webkit.org/show_bug.cgi?id=209346

Reviewed by Timothy Hatcher.

In the case of remote inspection, the frontend is told that docking is not available before
it is even shown (via InspectorFrontendAPI.setDockingUnavailable). Additionally, the
backend (WebKit::RemoteWebInspectorUI) never tells the frontend what dock side it actually
is (via InspectorFrontendAPI.setDockSide), as there would be no point, given that docking
is unavailable, meaning that the frontend must be undocked.

Before r257835, the docking state held by WI._dockConfiguration and WI.docked, neither
of which would be set as described above. As a result, in WI._updateDockNavigationItems
WI.docked would be undefined, which is falsy, thereby causing all docking navigation items
to be hidden. After r257835, these were merged into one WI.dockConfiguration, which is
compared against WI.DockConfiguration.Undocked instead of just being falsy checked,
meaning it would result in true which would not hide all of the docking navigation items.

Change the logic of WI.updateDockingAvailability such that if the frontend is told that
docking is unavailable, mark the WI.dockConfiguration as WI.DockConfiguration.Undocked.
This way, the frontend will always have a valid value for WI.dockConfiguration.

Additionally, further leverage InspectorFrontendHost.supportsDockSide to only create the
docking navigation items that are actually supported by the host.

  • UserInterface/Base/Main.js:

(WI.contentLoaded):
(WI.updateDockingAvailability):
(WI.resizeDockedFrameMouseDown):
(WI.dockedConfigurationSupportsSplitContentBrowser):
(WI._updateDockNavigationItems):
(WI._updateTabBarDividers):

  • UserInterface/Views/TabBar.js:

(WI.TabBar.get horizontalPadding):
(WI.TabBar.prototype.resetCachedWidths): Added.
When switching dock configurations, we need to reset the cached width of each tab bar item,
as otherwise, a large width cached when undocked can incorrectly be used when docked.

  • UserInterface/Views/TabBarItem.js:

(WI.TabBarItem.get horizontalMargin):
Replace negative checks of WI.dockConfiguration with positive ones that can't be fooled by
a falsy value.

11:59 AM Changeset in webkit [258777] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Fix the build.

  • WebCoreSupport/WebFrameLoaderClient.mm:
11:50 AM Changeset in webkit [258776] by Andres Gonzalez
  • 5 edits in trunk/Source/WebCore

Fix for retrieving focus in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=209336

Reviewed by Chris Fleizach.

Focused object requests can come on the secondary thread before the
isolated tree has been generated. Thus, AXObjectCache::isolatedTreeFocusedObject
needs to generate the isolated tree if it doesn't exist, similar to
isolatedTreeRootObject.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::isolatedTreeFocusedObject):
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::getOrCreateIsolatedTree const):
(WebCore::AXObjectCache::isolatedTreeRootObject):

  • accessibility/AXObjectCache.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::focusedUIElement const):

  • accessibility/isolatedtree/AXIsolatedTree.h:

m_pendingFocusedNodeID wasn't being initialized, which was causing
random crashes when accessing the HashMap of isolated objects for a
spurious AXID.

11:40 AM Changeset in webkit [258775] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ iOS ] http/tests/security/stylesheet-href-redirect.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209352

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:39 AM Changeset in webkit [258774] by commit-queue@webkit.org
  • 5 edits in trunk

Fix JSCOnly build without unified sources
https://bugs.webkit.org/show_bug.cgi?id=209343

Patch by Justin Michaud <justin@justinmichaud.com> on 2020-03-20
Reviewed by Keith Miller.

.:

  • .gitignore:

Source/JavaScriptCore:

I managed to get clangd to work for code completion using the following command:

./Tools/Scripts/build-webkit --jsc-only --cmakeargs="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_UNIFIED_BUILDS=OFF" && compdb -p WebKitBuild/Release/ list > compile_commands.json

This patch fixes the build for non-unified sources, and adds some extra clangd files to .gitignore.

  • API/MarkedJSValueRefArray.h:
  • jit/JITPropertyAccess.cpp:
11:37 AM Changeset in webkit [258773] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209350

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:31 AM Changeset in webkit [258772] by timothy_horton@apple.com
  • 23 edits in trunk

Upstream a variety of Cocoa-platform HAVE and ENABLE macros
https://bugs.webkit.org/show_bug.cgi?id=209307

Reviewed by Andy Estes.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:
  • pal/spi/cocoa/AVFoundationSPI.h:
  • pal/spi/cocoa/RevealSPI.h:
  • pal/spi/ios/UIKitSPI.h:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • Platform/spi/ios/PDFKitSPI.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::createRemoteView):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView web_initWithFrame:webView:mimeType:]):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
11:16 AM Changeset in webkit [258771] by Jacob Uphoff
  • 2 edits in trunk/LayoutTests

[ iOS ] REGRESSION: http/tests/cache/disk-cache/disk-cache-disable.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209349.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:50 AM Changeset in webkit [258770] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Use same syntax for ComputePagesForPrintingAndDrawToPDF message as other messages
https://bugs.webkit.org/show_bug.cgi?id=209310
<rdar://problem/60648013>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-20
Reviewed by Sam Weinig.

This makes it easier for scripts to find which messages are unused.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):

10:40 AM Changeset in webkit [258769] by youenn@apple.com
  • 15 edits in trunk

Add routines to check about:blank and about:srcdoc URLs
https://bugs.webkit.org/show_bug.cgi?id=209174

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/usvstring-reflection.https-expected.txt:

Source/WebCore:

  • Modules/fetch/FetchRequest.cpp:

(WebCore::computeReferrer):

  • dom/Document.cpp:

(WebCore::isURLPotentiallyTrustworthy):

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::location const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument const):

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):

Source/WebKit:

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:

(WebKit::WebResourceLoadObserver::requestStorageAccessUnderOpener):

Source/WTF:

  • wtf/URL.cpp:

(WTF::aboutSrcDocURL):
(WTF::URL::isAboutBlank const):
(WTF::URL::isAboutSrcDoc const):

  • wtf/URL.h:

LayoutTests:

  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https-expected.txt:
10:26 AM Changeset in webkit [258768] by sihui_liu@apple.com
  • 4 edits in trunk/LayoutTests

REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318
<rdar://problem/60657081>

Reviewed by Ryosuke Niwa.

Open fewer cursors to make the test faster.

  • storage/indexeddb/cursor-leak-expected.txt:
  • storage/indexeddb/cursor-leak-private-expected.txt:
  • storage/indexeddb/resources/cursor-leak.js:

(onOpen.tx.oncomplete):

10:02 AM Changeset in webkit [258767] by Chris Dumez
  • 13 edits in trunk/Source

[iOS] Articles on NYTimes.com get truncated when switching between MobileSafari and another app
https://bugs.webkit.org/show_bug.cgi?id=209321
<rdar://problem/59763843>

Reviewed by Tim Horton.

Articles on NYTimes.com get truncated when switching between MobileSafari and another app
Source/WebCore:

(multitasking). The reason is that when you home out of MobileSafari, snapshots of the
web view are taken at various sizes and we were firing 5 resizes events at the page as a
result. Those resize events were confusing the logic on NYTimes.com and causing it to
truncate the article.

To address the issue, we stop firing resize events at the page if the resize is happening
during the snapshotting sequence.

  • page/FrameView.cpp:

(WebCore::FrameView::sendResizeEventIfNeeded):

  • page/Page.h:

(WebCore::Page::shouldFireResizeEvents const):
(WebCore::Page::setShouldFireResizeEvents):

Source/WebKit:

(multitasking). The reason is that when you home out of MobileSafari, snapshots of the
web view are taken at various sizes and we were firing 5 resizes events at the page as a
result. Those resize events were confusing the logic on NYTimes.com and causing it to
truncate the article.

To address the issue, we stop firing resize events at the page if the resize is happening
during the snapshotting sequence.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ApplicationStateTracker.h:
  • UIProcess/ApplicationStateTracker.mm:

(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
(WebKit::ApplicationStateTracker::willBeginSnapshotSequence):
(WebKit::ApplicationStateTracker::didCompleteSnapshotSequence):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKApplicationStateTrackingView.mm:

(-[WKApplicationStateTrackingView didMoveToWindow]):
(-[WKApplicationStateTrackingView _willBeginSnapshotSequence]):
(-[WKApplicationStateTrackingView _didCompleteSnapshotSequence]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setShouldFireResizeEvents):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
9:31 AM Changeset in webkit [258766] by Jacob Uphoff
  • 2 edits in trunk/Source/WebCore/PAL

Unreviewed, reverting r258762.

This commit broke the Catalina build

Reverted changeset:

"Fix the build"
https://trac.webkit.org/changeset/258762

9:30 AM Changeset in webkit [258765] by Jacob Uphoff
  • 23 edits in trunk

Unreviewed, reverting r258748.

This commit broke the Catalina build

Reverted changeset:

"Upstream a variety of Cocoa-platform HAVE and ENABLE macros"
https://bugs.webkit.org/show_bug.cgi?id=209307
https://trac.webkit.org/changeset/258748

8:56 AM Changeset in webkit [258764] by eocanha@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Layout Test media/track/track-legacyapi-with-automatic-mode.html is failing
https://bugs.webkit.org/show_bug.cgi?id=118459

Unreviewed gardening.

The test passes now. Removed media/track/track-legacyapi-with-automatic-mode.html from TextExpectations.

  • platform/gtk/TestExpectations:
8:51 AM Changeset in webkit [258763] by eric.carlson@apple.com
  • 2 edits in trunk/LayoutTests

[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196502
<rdar://problem/49532580>

Unreviewed, revert changes to iOS TestExpectations made in r258747.

  • platform/ios/TestExpectations:
8:01 AM Changeset in webkit [258762] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Fix the build

  • pal/spi/cocoa/RevealSPI.h:
7:59 AM Changeset in webkit [258761] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Avoid infinite loop when stuck on partial content
https://bugs.webkit.org/show_bug.cgi?id=209312
<rdar://problem/59954605>

Reviewed by Simon Fraser.

Speculative fix to address infinite loop/running out of inline run vector capacity at InlineFormattingContext::setDisplayBoxesForLine.
(Checking if we managed to progress on the content while having partial runs.)

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::nextContentForLine):
(WebCore::Layout::LineLayoutContext::handleFloatsAndInlineContent):

7:31 AM Changeset in webkit [258760] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] commit-queue should comment on bug if patch fails to apply
https://bugs.webkit.org/show_bug.cgi?id=209334

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(ApplyPatch):
(ApplyPatch.evaluateCommand): Overridden to check build status and queue name and comment on bug accordingly.

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

(TestApplyPatch):
(TestApplyPatch.setUp):
(TestApplyPatch.setUp.mock_start):
(TestApplyPatch.tearDown):
(TestApplyPatch.test_success):
(TestApplyPatch.test_failure):
(TestApplyPatch.test_failure_on_commit_queue):

4:48 AM Changeset in webkit [258759] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] White-list vp09 in the codec registry
https://bugs.webkit.org/show_bug.cgi?id=209288

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::initialize):

3:48 AM Changeset in webkit [258758] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

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

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/svg/painting/reftests/paint-order-001-expected.txt:

Update baseline after r258492.

3:29 AM Changeset in webkit [258757] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[EWS] Limit number of builds to display in status-bubble hover over message in case of lot of retried builds
https://bugs.webkit.org/show_bug.cgi?id=209122

Reviewed by Jonathan Bedard.

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

(StatusBubble._build_bubble):

2:41 AM WebKitGTK/2.28.x edited by Philippe Normand
(diff)
2:27 AM Changeset in webkit [258756] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
https://bugs.webkit.org/show_bug.cgi?id=209251
<rdar://problem/60103614>

Patch by Jack Lee <Jack Lee> on 2020-03-20
Reviewed by Antti Koivisto.

Source/WebCore:

It’s perfectly fine to call AccessibilityRenderObject::nextSibling on the RenderView (empty document) and since the RenderView has no sibling, let’s just early return with nullptr.

Test: fast/frames/iframe-empty-doc-crash.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::nextSibling const):

LayoutTests:

It’s perfectly fine to call AccessibilityRenderObject::nextSibling on the RenderView (empty document) and since the RenderView has no sibling, let’s just early return with nullptr.

  • fast/frames/iframe-empty-doc-crash-expected.txt: Added.
  • fast/frames/iframe-empty-doc-crash.html: Added.
2:15 AM Changeset in webkit [258755] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix build with gstreamer 1.12
https://bugs.webkit.org/show_bug.cgi?id=209296

Patch by Mike Gorse <mgorse@suse.com> on 2020-03-20
Reviewed by Philippe Normand.

No new tests (build fix only).

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkChangeState): Add GST_VERSION_CHECK around check for
GST_STATE_CHANGE_READY_TO_READY.

2:01 AM Changeset in webkit [258754] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[Unix] Allow runtime release logging levels configuration
https://bugs.webkit.org/show_bug.cgi?id=209286

Reviewed by Adrian Perez de Castro.

Setting to a comma-separated list like in this example should now work as expected:

WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...

  • platform/unix/LoggingUnix.cpp:

(WebCore::logLevelString):

Mar 19, 2020:

11:03 PM Changeset in webkit [258753] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Some scroll snapping tests are still flaky
https://bugs.webkit.org/show_bug.cgi?id=165196

Reviewed by Wenson Hsieh.

WheelEventTestMonitor could trigger too early if the main thread was bogged down, delaying
the firing of the m_updateNodeScrollPositionTimer scheduled from
AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll().

Fix by extending the life of the "ScrollingThreadSyncNeeded" reason until after the m_updateNodeScrollPositionTimer
has fired

Fixes flakiness of tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
and others.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::noteScrollingThreadSyncCompleteForNode):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

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

SharedMemory::allocate() should initialize address
<https://webkit.org/b/209315>
<rdar://problem/60606720>

Reviewed by Geoffrey Garen.

  • Platform/cocoa/SharedMemoryCocoa.cpp:

(WebKit::SharedMemory::allocate): Initialize address to zero.

9:41 PM Changeset in webkit [258751] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Unable to build WebKit with iOS 13.4 SDK
https://bugs.webkit.org/show_bug.cgi?id=209317

Reviewed by Simon Fraser.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKMouseGestureRecognizer.mm:
8:05 PM Changeset in webkit [258750] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[macoOS] Remove access to 'apple-extension-services' from the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=209324
<rdar://problem/58089661>

Reviewed by Per Arne Vollan.

Remove the last of permissions for the unused 'apple-extension-services' mach service.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
8:05 PM Changeset in webkit [258749] by Peng Liu
  • 2 edits in trunk/Source/WebCore

Safari video gravity changes performance improvements
https://bugs.webkit.org/show_bug.cgi?id=209316

Reviewed by Eric Carlson.

Remove an unnecessary (and harmful) call of setVideoLayerFrame in WebAVPlayerLayer:layoutSublayers.

When a video with the gravity AVLayerVideoGravityResizeAspectFill needs to enter the
picture-in-picture mode from fullscreen, the extra call of setVideoLayerFrame will send
an extra IPC message to the Web process to set the video layer bounds. So the [CATransaction commit]
will need to wait for three property changes to complete - two in the Web process, and one in the
UI process. The interval of the two property changes in the Web process is over 100 ms, because we
delay the call of resolveBounds (which calls the second setVideoLayerFrame) at least 100 ms
in WebAVPlayerLayer:layoutSublayers. That leads to long durations of core animation commits.
In the test, the longest duration of commits is over 500 ms. After applying this patch,
the longest duration in the test is about 50 ms.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerLayer layoutSublayers]):

6:59 PM Changeset in webkit [258748] by timothy_horton@apple.com
  • 23 edits in trunk

Upstream a variety of Cocoa-platform HAVE and ENABLE macros
https://bugs.webkit.org/show_bug.cgi?id=209307

Reviewed by Andy Estes.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:
  • pal/spi/cocoa/AVFoundationSPI.h:
  • pal/spi/cocoa/RevealSPI.h:
  • pal/spi/ios/UIKitSPI.h:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • Platform/spi/ios/PDFKitSPI.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::createRemoteView):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView web_initWithFrame:webView:mimeType:]):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
5:50 PM Changeset in webkit [258747] by eric.carlson@apple.com
  • 6 edits in trunk/LayoutTests

[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196502
<rdar://problem/49532580>

Reviewed by Jer Noble.

  • media/video-background-tab-playback-expected.txt:
  • media/video-background-tab-playback.html: Don't assume the state will change in 100ms.
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
5:42 PM Changeset in webkit [258746] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Unreviewed test fixing.

Tests that fire multiple wheel event sequences need to call eventSender.monitorWheelEvents() between each one.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:
5:03 PM Changeset in webkit [258745] by achristensen@apple.com
  • 2 edits
    1 delete in trunk/Tools

Remove test failing after r258734
https://bugs.webkit.org/show_bug.cgi?id=209303

We removed the functionality it was testing because it did nothing useful except call the callback.
I'm about to remove the only user of WKContextGetStatistics.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp: Removed.
4:48 PM Changeset in webkit [258744] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

ScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAllowedInSubtree asserts in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=209165

Patch by Sunny He <sunny_he@apple.com> on 2020-03-19
Reviewed by Ryosuke Niwa.

Under very intricate sequences of event dispatch in WebKit1, it is
possible for security asserts to be triggered even if there is no
underlying security issue soley due to the design patterns of
WebKit1.

No new tests since the conditions for reproduction are very delicate
and difficult to reliably capture in a test case.

  • dom/ScriptDisallowedScope.h:

(WebCore::ScriptDisallowedScope::isEventAllowedInMainThread):
(WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):

4:41 PM Changeset in webkit [258743] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

commit-queue status-bubble shows incorrect position in queue
https://bugs.webkit.org/show_bug.cgi?id=209313

Reviewed by Jonathan Bedard.

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

(StatusBubble._queue_position):

4:38 PM Changeset in webkit [258742] by Jacob Uphoff
  • 3 edits in trunk/LayoutTests

REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318

Fixing expectations

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
4:32 PM Changeset in webkit [258741] by commit-queue@webkit.org
  • 5 edits in trunk

Sanitize suggested download filename received from web process
https://bugs.webkit.org/show_bug.cgi?id=209300
<rdar://problem/59487723>

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

Source/WebKit:

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):

LayoutTests:

  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:
4:26 PM Changeset in webkit [258740] by Jacob Uphoff
  • 3 edits in trunk/LayoutTests

REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318

Unreviewed test gardening

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
4:05 PM Changeset in webkit [258739] by eric.carlson@apple.com
  • 2 edits in trunk/LayoutTests

Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Unreviewed tweak of r258700, increase the maximum tolerance to +/- 2.

  • resources/platform-helper.js:

(videoCanvasPixelComparisonTolerance):
(checkPixelColorWithTolerance):

3:55 PM Changeset in webkit [258738] by Kate Cheney
  • 3 edits in trunk/Source/WebKit

Handle failed ITP Database insert attempts
https://bugs.webkit.org/show_bug.cgi?id=209253
<rdar://problem/58886756>

Reviewed by David Kilzer.

A first step toward handling I/O errors in the database. Adds checks
so that in the case where a domain insert fails, we don't execute
code which relies on this domain being in the database.

Future steps will be figuring out a way to schedule failed queries
to execute when the database is accepting inputs in the future.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain):
Check if the query to insert a domain failed. If so, return
WTF::nullopt in place of the domain ID to indicate the failure.

(WebKit::ResourceLoadStatisticsDatabaseStore::ensureAndMakeDomainList):
The simplest solution here was to only append strings to this list
if they are already in the database, or are successfully inserted,
because insertDomainRelationshipList() relies on these being in the database.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation):
(WebKit::ResourceLoadStatisticsDatabaseStore::logCrossSiteLoadWithLinkDecoration):
(WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setGrandfathered):
(WebKit::ResourceLoadStatisticsDatabaseStore::setIsScheduledForAllButCookieDataRemoval):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubframeUnderTopFrameDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUnderTopFrameDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsDatabaseStore::setLastSeen):
(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setVeryPrevalentResource):
Every call to ensureResourceStatisticsForRegistrableDomain should
check the result to make sure the domain was inserted before
continuing, and return early (or return a value that does not further
rely on the database information, like an empty vector). Log these
errors but don't add a debug assert because there already is one in
ensureResourceStatisticsForRegistrableDomain.

  • (WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):
  • (WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistics):

The simplest thing to do in this case is to return early if any domain
inserts fail before inserting domain relationships as a best-effort
approach. A future step could be maintaining a vector of statistics
which successfully inserted, and only adding those relationships.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

ensureResourceStatisticsForRegistrableDomain should return an
Optional domain ID to account for failed inserts.

3:50 PM Changeset in webkit [258737] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Upstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
https://bugs.webkit.org/show_bug.cgi?id=209305

Reviewed by Andy Estes.

Source/WebCore:

  • platform/mac/BlacklistUpdater.mm:

Source/WebKit:

  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::AuxiliaryProcess::isSystemWebKit):

Source/WTF:

  • wtf/PlatformHave.h:
3:44 PM Changeset in webkit [258736] by Brent Fulgham
  • 6 edits in trunk

Remove Mobile Asset access from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209302
<rdar://problem/56305023>

Reviewed by Per Arne Vollan.

Source/WebKit:

Tested by fast/sandbox/ios/sandbox-mach-lookup.html

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
3:27 PM Changeset in webkit [258735] by jfernandez@igalia.com
  • 3 edits
    32 adds in trunk

[css-grid] Changes in grid or elements inside the grid affects margin on other elements in the grid
https://bugs.webkit.org/show_bug.cgi?id=209203

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Imported new Web Platform tests to detect regressions in the auto-margins logic durignn relayouts.

  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html: Added.

Source/WebCore:

We should ignore the previously computed auto margins wheneven a relayout is performed.

Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html

imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html
imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):

3:18 PM Changeset in webkit [258734] by commit-queue@webkit.org
  • 9 edits
    2 deletes in trunk/Source/WebKit

Remove unused WebProcessPool::didGetStatistics
https://bugs.webkit.org/show_bug.cgi?id=209303
<rdar://problem/60648454>

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

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::didGetStatistics): Deleted.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessPool.messages.in:
3:06 PM Changeset in webkit [258733] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Remove caching of isOnScreen since it is not used.
https://bugs.webkit.org/show_bug.cgi?id=209306

Reviewed by Chris Fleizach.

AXIsolatedObject was caching isOnScreen and it wasn't used. It has a
performance impact since it needs to run on the main thread. thus this
change removes it from the cache.

  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):

  • accessibility/isolatedtree/AXIsolatedObject.h:
2:59 PM Changeset in webkit [258732] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] StructureStubInfo::bufferedStructures should not ref/deref UniquedStringImpl
https://bugs.webkit.org/show_bug.cgi?id=209266
<rdar://problem/60508312>

Reviewed by Saam Barati.

StructureStubInfo::bufferedStructures includes RefPtr<UniquedStringImpl>. So destroying StructureStubInfo in
CodeBlock::finalizeUnconditionally can access to AtomStringTable, and get nullptr AtomStringTable since
CodeBlock::finalizeUnconditionally can be executed in heap-thread.

Temporarily setting AtomStringTable in the heap-thread when executing GC End phase is dangerous: Web worker's
JSC VM is releasing heapAccess when waiting for the next message in the RunLoop. This potentially means that
Web worker's main thread can run concurrently with Web worker's JSC VM's End phase heap-thread until the web
worker takes JSLock. (This is not a problem in WebCore since WebCore JSC VM never releases heapAccess. We cannot
take the same design since we would like to run End phase even if web worker is not getting any messages).

And removing resetJITData in CodeBlock::finalizeUnconditionally does not fix as well since CodeBlock::finalizeUnconditionally
calls StructureStubInfo::visitWeakReferences, and it removes some of entries of StructureStubInfo::bufferedStructures after
ByVal extension is introduced into StructureStubInfo.

This patch uses CacheableIdentifier for bufferedStructures. We make BufferedStructure class which holds Structure and CacheableIdentifier.
And StructureStubInfo holds HashSet<BufferedStructure>. We also visit CacheableIdentifier in StructureStubInfo::visitAggregate. To allow
concurrent collector to run this, we introduce m_bufferedStructuresLock in StructureStubInfo to guard m_bufferedStructures.

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitAggregate):
(JSC::StructureStubInfo::visitWeakReferences):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::considerCaching):
(JSC::StructureStubInfo::getByIdSelfIdentifier):
(JSC::StructureStubInfo::cacheType const):
(JSC::StructureStubInfo::clearBufferedStructures):
(JSC::StructureStubInfo::BufferedStructure::BufferedStructure):
(JSC::StructureStubInfo::BufferedStructure::isHashTableDeletedValue const):
(JSC::StructureStubInfo::BufferedStructure::hash const):
(JSC::StructureStubInfo::BufferedStructure::operator==):
(JSC::StructureStubInfo::BufferedStructure::operator!=):
(JSC::StructureStubInfo::BufferedStructure::Hash::hash):
(JSC::StructureStubInfo::BufferedStructure::Hash::equal):
(JSC::StructureStubInfo::BufferedStructure::structure const):
(JSC::StructureStubInfo::BufferedStructure::byValId const):

  • jit/JITOperations.cpp:
  • runtime/CacheableIdentifier.h:

(JSC::CacheableIdentifier::hash const):

2:57 PM Changeset in webkit [258731] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

URL needs to be isolatedCopied when cached in AXIsolatedObject.
https://bugs.webkit.org/show_bug.cgi?id=209298

Reviewed by Chris Fleizach.

AXIsolatedObject needs to isolatedCopy the URL property in order to use
it on the secondary thread.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):

2:41 PM Changeset in webkit [258730] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: AXI: disabled buttons shouldn't be focusable
https://bugs.webkit.org/show_bug.cgi?id=208283
<rdar://problem/59832150>

Reviewed by Devin Rousso.

Set tabIndex to "-1" when button becomes disabled.

  • UserInterface/Views/ActivateButtonNavigationItem.js:

(WI.ActivateButtonNavigationItem):

  • UserInterface/Views/ButtonNavigationItem.js:

_role is defined in the parent class now.

(WI.ButtonNavigationItem):
(WI.ButtonNavigationItem.prototype.set enabled):
(WI.ButtonNavigationItem.prototype.get tabbable):
(WI.ButtonNavigationItem.prototype._updateTabIndex):

  • UserInterface/Views/RadioButtonNavigationItem.js:

(WI.RadioButtonNavigationItem.prototype.get tabbable):
(WI.RadioButtonNavigationItem):

2:35 PM Changeset in webkit [258729] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
https://bugs.webkit.org/show_bug.cgi?id=209301

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.removeChildAtIndex):
Check suppressSelectSibling once instead of three times.

2:18 PM Changeset in webkit [258728] by commit-queue@webkit.org
  • 11 edits in trunk

[Curl] Add an API returns description of verification errors.
https://bugs.webkit.org/show_bug.cgi?id=208913

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-03-19
Reviewed by Fujii Hironori.

WKCertificateInfoCopyVerificationErrorDescription returns the description of SSL verification error as human readable string.
Browser can display more precise error information with this API.

API Test: Curl.CertificateAPI

Source/WebCore:

  • platform/network/curl/CertificateInfo.h:
  • platform/network/curl/CertificateInfoCurl.cpp:

(WebCore::CertificateInfo::verificationErrorDescription const):

Source/WebKit:

  • Shared/API/c/curl/WKCertificateInfoCurl.cpp:

(WKCertificateInfoCopyVerificationErrorDescription):

  • Shared/API/c/curl/WKCertificateInfoCurl.h:

Tools:

  • MiniBrowser/win/Common.cpp:

(askServerTrustEvaluation):

  • MiniBrowser/win/Common.h:
  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(createPEMString):
(WebKitBrowserWindow::canTrustServerCertificate):

  • TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp:

(TestWebKitAPI::Curl::TEST):

2:17 PM Changeset in webkit [258727] by mmaxfield@apple.com
  • 7 edits in trunk/LayoutTests

Update imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict,normal}-015.xht
https://bugs.webkit.org/show_bug.cgi?id=209250
<rdar://problem/59957596>

Update them according to https://github.com/web-platform-tests/wpt/commit/7d24adef541b2e836f2b2f9534ce3f0e078f5782

Reviewed by Antti Koivisto.

  • platform/ios/TestExpectations: Mark as failing on old OSes
  • platform/mac/TestExpectations: Mark as failing on old OSes
  • web-platform-tests/css/css-text/line-break/line-break-normal-015-expected.xht:
  • web-platform-tests/css/css-text/line-break/line-break-normal-015.xht:
  • web-platform-tests/css/css-text/line-break/line-break-strict-015-expected.xht:
  • web-platform-tests/css/css-text/line-break/line-break-strict-015.xht:
2:13 PM Changeset in webkit [258726] by pvollan@apple.com
  • 5 edits in trunk

[iOS] Deny mach lookup access to power service
https://bugs.webkit.org/show_bug.cgi?id=208460
<rdar://problem/57026325>

Reviewed by Darin Adler.

Source/WebKit:

On iOS, deny mach lookup access to the power service in the WebContent process.

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

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

LayoutTests:

  • fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/ios/sandbox-mach-lookup.html:
2:03 PM Changeset in webkit [258725] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] http/tests/workers/service/service-worker-cache-api.https.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209304

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:21 PM Changeset in webkit [258724] by Russell Epstein
  • 1 edit in branches/safari-609-branch/Source/WebKit/UIProcess/WebPageProxy.cpp

Unreviewed build fix, rdar://problem/60633852

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

1:12 PM Changeset in webkit [258723] by Alan Coon
  • 11 edits
    1 delete in branches/safari-609-branch/Source/WebKit

Revert r258722. rdar://problem/60633852

12:28 PM Changeset in webkit [258722] by Alan Coon
  • 11 edits
    1 copy in branches/safari-609-branch/Source/WebKit

Cherry-pick r255135. rdar://problem/60633852

Frequent sync BackForwardBackListCount/BackForwardForwardListCount IPC on reddit.com
https://bugs.webkit.org/show_bug.cgi?id=206438

Reviewed by Darin Adler.

Frequent sync BackForwardBackListCount/BackForwardForwardListCount IPC on reddit.com. When scrolling on reddit.com,
you frequently see 2 consecutive sync IPCs (WebPageProxy::BackForwardBackListCount then WebPageProxy::BackForwardForwardListCount)
from the WebContent process to the UIProcess. Those are bad for performance. This happens every time the script on the page accesses
history.length, which is unfortunate, since this history length rarely changes.

To address the issue, the following changes were made:

  1. Merge BackForwardBackListCount / BackForwardForwardListCount IPCs into a single BackForwardListCounts IPC which returns both the back & forward counts, since we often need both (e.g. when accessing history.length) and since gettings those counts is very cheap compared to the cost of a sync IPC.
  2. Cache those counts in WebBackForwardListProxy and blow away the cached counts whenever the back/forward list changes. In the common case (where the back/forward list rarely changes), we now see a single sync IPC instead of many (verified on reddit.com).

No new tests, merely a performance improvement.

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::addItemFromUIProcess): (WebKit::WebBackForwardListProxy::addItem): (WebKit::WebBackForwardListProxy::goToItem): (WebKit::WebBackForwardListProxy::backListCount const): (WebKit::WebBackForwardListProxy::forwardListCount const): (WebKit::WebBackForwardListProxy::cacheListCountsIfNecessary const): (WebKit::WebBackForwardListProxy::clearCachedListCounts): (WebKit::WebBackForwardListProxy::close): (WebKit::WebBackForwardListProxy::clear):
  • WebProcess/WebPage/WebBackForwardListProxy.h:

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

12:16 PM Changeset in webkit [258721] by timothy_horton@apple.com
  • 15 edits in trunk/Source

Implement support for cursor interactions on iPad
https://bugs.webkit.org/show_bug.cgi?id=209268

Reviewed by Darin Adler.

No new tests in this patch, just upstreaming. Will attempt to enable
some macOS mouse event tests on iOS in the future, though.

  • wtf/PlatformEnableCocoa.h:

Don't disable the contextmenu event on iOS anymore.

  • wtf/PlatformHave.h:

Rename HAVE_HOVER_GESTURE_RECOGNIZER to HAVE_UIKIT_WITH_MOUSE_SUPPORT.
Add HAVE_UI_CURSOR_INTERACTION.
Enable HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER on iOS.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isNews):
(WebCore::IOSApplication::isStocks):
(WebCore::IOSApplication::isFeedly):
Add some bundle ID checks needed in WebKit.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/Cocoa/VersionChecks.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _showShareSheet:inRect:completionHandler:]):
(-[WKContentView setupDragAndDropInteractions]):
(-[WKContentView shouldUseMouseGestureRecognizer]):
(-[WKContentView setupMouseGestureRecognizer]):
(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView setupCursorInteraction]):
(-[WKContentView _cursorInteraction:regionForLocation:defaultRegion:completion:]):
(-[WKContentView cursorRegionForPositionInformation:point:]):
(-[WKContentView cursorInteraction:styleForRegion:modifiers:]):
(-[WKContentView _mouseGestureRecognizerChanged:]): Deleted.

  • UIProcess/ios/WKMouseGestureRecognizer.h:
  • UIProcess/ios/WKMouseGestureRecognizer.mm:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::shouldUseMouseEventForSelection):

12:03 PM WebKitGTK/2.28.x edited by Michael Catanzaro
Propose r258710 (diff)
12:01 PM WebKitGTK/2.28.x edited by Michael Catanzaro
Propose r258717 and r258719 (diff)
11:43 AM Changeset in webkit [258720] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Fix test expectation for fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html
https://bugs.webkit.org/show_bug.cgi?id=209052

unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:41 AM Changeset in webkit [258719] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r258717
https://bugs.webkit.org/show_bug.cgi?id=199295

  • llint/LowLevelInterpreter.asm:
11:32 AM Changeset in webkit [258718] by Jason_Lawrence
  • 3 edits in trunk/LayoutTests

[ iOS wk2 and Mac Debug wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209295

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:28 AM Changeset in webkit [258717] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

sanitizeStackForVMImpl writes below stack pointer, triggers huge warning spam from valgrind
https://bugs.webkit.org/show_bug.cgi?id=199295

Reviewed by Mark Lam.

During sanitizeStackForVMImpl, we should not access to the region beyond the stack-pointer.
This patch changes stack-pointer while sanitizeStackForVMImpl is zero-filling the old stack region.

  • llint/LowLevelInterpreter.asm:
11:06 AM Changeset in webkit [258716] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209283

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:00 AM Changeset in webkit [258715] by Alan Coon
  • 2 edits in branches/safari-609.2.1.2-branch/Source/JavaScriptCore

Cherry-pick r258062. rdar://problem/60396604

REGRESSION (r258038): Build failure on Windows 10 bots
<https://bugs.webkit.org/show_bug.cgi?id=208731>
<rdar://problem/59222568>

  • assembler/testmasm.cpp: (JSC::testCompareDouble): (JSC::testCompareDoubleSameArg): (JSC::testMoveConditionallyFloatingPoint): (JSC::testMoveConditionallyFloatingPointSameArg):
  • Add RELEASE_ASSERT_NOT_REACHED() statements to try to fix the bots.

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

11:00 AM Changeset in webkit [258714] by Alan Coon
  • 3 edits in branches/safari-609.2.1.2-branch/Source/JavaScriptCore

Cherry-pick r258038. rdar://problem/60396604

Fix some issues in the ARM64 moveConditionallyAfterFloatingPointCompare() and moveDoubleConditionallyAfterFloatingPointCompare().
https://bugs.webkit.org/show_bug.cgi?id=208731
<rdar://problem/59222568>

Reviewed by Saam Barati.

Both the ARM64 moveConditionallyAfterFloatingPointCompare() and
moveDoubleConditionallyAfterFloatingPointCompare() had the following issues:

  1. For the DoubleNotEqual condition, they fail to set the result register if one or both of the comparison operands is a NaN.
  1. For the DoubleEqualOrUnordered condition, they can clobber the else case input register if one of the comparison operands is a NaN.

This patch fixes both of these, and exhaustive testmasm test cases for affected
MacroAssembler instruction emitters using these functions.

  • assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare): (JSC::MacroAssemblerARM64::moveDoubleConditionallyAfterFloatingPointCompare):
  • assembler/testmasm.cpp: (JSC::testCompareDouble): (JSC::testCompareDoubleSameArg): (JSC::testMoveConditionallyFloatingPoint): (JSC::testMoveConditionallyDouble2): (JSC::testMoveConditionallyDouble3): (JSC::testMoveConditionallyDouble3DestSameAsThenCase): (JSC::testMoveConditionallyDouble3DestSameAsElseCase): (JSC::testMoveConditionallyFloat2): (JSC::testMoveConditionallyFloat3): (JSC::testMoveConditionallyFloat3DestSameAsThenCase): (JSC::testMoveConditionallyFloat3DestSameAsElseCase): (JSC::testMoveDoubleConditionallyDouble): (JSC::testMoveDoubleConditionallyDoubleDestSameAsThenCase): (JSC::testMoveDoubleConditionallyDoubleDestSameAsElseCase): (JSC::testMoveDoubleConditionallyFloat): (JSC::testMoveDoubleConditionallyFloatDestSameAsThenCase): (JSC::testMoveDoubleConditionallyFloatDestSameAsElseCase): (JSC::testMoveConditionallyFloatingPointSameArg): (JSC::testMoveConditionallyDouble2SameArg): (JSC::testMoveConditionallyDouble3SameArg): (JSC::testMoveConditionallyFloat2SameArg): (JSC::testMoveConditionallyFloat3SameArg): (JSC::testMoveDoubleConditionallyDoubleSameArg): (JSC::testMoveDoubleConditionallyFloatSameArg): (JSC::run):

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

10:59 AM Changeset in webkit [258713] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208925
<rdar://problem/58885485>

Reviewed by Darin Adler.

On iOS, add telemetry for message filtering in the WebContent process' sandbox.

No new tests, no behavior change.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
10:51 AM Changeset in webkit [258712] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

AXIsolatedObject implementation of the title method.
https://bugs.webkit.org/show_bug.cgi?id=209291

Reviewed by Chris Fleizach.

  • Implements AXIsolatedObgject::title.
  • Modified implementation of AXIsolatedObject::titleAttributeValue to

use its appropriate key.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::title const): Deleted.

  • accessibility/isolatedtree/AXIsolatedObject.h:
10:45 AM Changeset in webkit [258711] by Chris Fleizach
  • 3 edits
    2 adds in trunk

Source/WebCore:
AX: VO and safari: can't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

  • accessibility/ios/AccessibilityObjectIOS.mm:

(WebCore::AccessibilityObject::hasTouchEventListener const):

LayoutTests:
AX: VO and safari: caan't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

  • accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
  • accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.
10:44 AM Changeset in webkit [258710] by tpopela@redhat.com
  • 6 edits in trunk/JSTests

[JSC][BigEndians] Several JSC stress tests failing
https://bugs.webkit.org/show_bug.cgi?id=194007

Reviewed by Michael Catanzaro.

Adapt the DataView tests to be able to pass on little endian as well
as the big endian hardware. Do so by introducing method that determine
the endianess and based on its value it saves the expected results in
the right format.

  • stress/dataview-get-cse.js:

(getIsLittleEndian):
(adjustForEndianess):
(test3.foo):
(test3):

  • stress/dataview-jit-get.js:

(getIsLittleEndian):
(test1.adjustForEndianess):
(test1):
(test2.adjustForEndianess):
(test2):
(test3.adjustForEndianess):
(test3):
(adjustForEndianessUint32):
(test4):
(test5):
(test6):
(test7):
(test8):

  • stress/dataview-jit-neuter.js:

(getIsLittleEndian):
(adjustForEndianess):
(test):
(test2):

  • stress/dataview-jit-set-nan.js:

(getIsLittleEndian):
(adjustForEndianessFloat32):
(test):

  • stress/dataview-jit-set.js:

(getIsLittleEndian):
(readHex):
(adjustForEndianessUint16):
(test):
(test2):
(adjustForEndianessUint32):
(test3):
(test4):
(adjustForEndianessFloat32):
(test5):
(adjustForEndianessFloat64):
(test6):
(isLittleEndian): Deleted.

10:44 AM Changeset in webkit [258709] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/ThirdParty/libwebrtc

Cherry-pick r258690. rdar://problem/60633853

Cherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
https://bugs.webkit.org/show_bug.cgi?id=209204
<rdar://problem/59362671>

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

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:

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

10:44 AM Changeset in webkit [258708] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Apply patch. rdar://problem/60633852

10:23 AM Changeset in webkit [258707] by sihui_liu@apple.com
  • 4 edits in trunk/LayoutTests

Flaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak-private.html
https://bugs.webkit.org/show_bug.cgi?id=209256
<rdar://problem/60097171>

Reviewed by Geoffrey Garen.

gc() does not guarantee all objects to be collected due to our conservative GC. To make the test more stable, we
now test if there is at lease one object is collected, which is enough to show cursor does not hold strong
reference to script value properties.

  • storage/indexeddb/cursor-leak-expected.txt:
  • storage/indexeddb/cursor-leak-private-expected.txt:
  • storage/indexeddb/resources/cursor-leak.js:

(onOpen.tx.oncomplete):
(onOpen.cursorRequest.onsuccess): Deleted.

10:14 AM Changeset in webkit [258706] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Update build.webkit.org link for EWS
https://bugs.webkit.org/show_bug.cgi?id=209280

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/templates/root.html:
10:07 AM Changeset in webkit [258705] by stephan.szabo@sony.com
  • 2 edits in trunk/Tools

[WinCairo] extract-built-product fails after r258612
https://bugs.webkit.org/show_bug.cgi?id=209285

extractBuiltProduct also references the old name for the
requirements on wincairo.

Reviewed by Ross Kirsling.

  • BuildSlaveSupport/built-product-archive:
10:02 AM Changeset in webkit [258704] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209284

Reviewed by Chris Fleizach.

  • Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
  • [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(-[WebAccessibilityObjectWrapper windowElement:]):

9:49 AM Changeset in webkit [258703] by Jason_Lawrence
  • 3 edits in trunk/LayoutTests

[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209281

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
9:42 AM Changeset in webkit [258702] by commit-queue@webkit.org
  • 9 edits in trunk

[Web Animations] Mark promises as handled when rejected
https://bugs.webkit.org/show_bug.cgi?id=209240
<rdar://problem/60592305>

Patch by Antoine Quint <Antoine Quint> on 2020-03-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add the new WPT tests added for this spec change (https://github.com/web-platform-tests/wpt/pull/22314) and revert some workarounds
made in our copy of WPT tests to previously silence flaky console output related to promise rejections (added in r258275 and r258276).

  • web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/finished.html:
  • web-platform-tests/web-animations/interfaces/Animation/ready-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/ready.html:
  • web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:
  • web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html:

Source/WebCore:

Implementing the spec change discussed in https://github.com/w3c/csswg-drafts/issues/4556.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):

9:03 AM Changeset in webkit [258701] by Simon Fraser
  • 16 edits in trunk/LayoutTests

Many tests relying on eventSender.monitorWheelEvents() are no longer flaky
https://bugs.webkit.org/show_bug.cgi?id=209272

Reviewed by Wenson Hsieh.

Remove tests from TestExpectations that were flakey because of bug 197819.

Fix some scroll-snap tests which were written before CSS OM View changes made document.body
not the scrolling element.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
  • tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:
8:34 AM Changeset in webkit [258700] by eric.carlson@apple.com
  • 6 edits in trunk/LayoutTests

Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Reviewed by Youenn Fablet.

  • fast/mediastream/MediaStream-video-element-displays-buffer.html:
  • fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
  • fast/mediastream/media-stream-renders-first-frame.html:
  • fast/mediastream/resize-trim.html:
  • resources/platform-helper.js:

(checkPixelColorWithTolerance):
(isPixelBlack):
(isPixelTransparent):
(isPixelWhite):
(isPixelGray):

8:24 AM Changeset in webkit [258699] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] Release logs not sent to journald when running within the SDK runtime
https://bugs.webkit.org/show_bug.cgi?id=209223

Reviewed by Carlos Alberto Lopez Perez.

flatpak build doesn't expose a --socket option for white-listing
the systemd journal socket. So white-list everything in /run. 🤷

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

8:17 AM Changeset in webkit [258698] by cturner@igalia.com
  • 38 edits in trunk

Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
https://bugs.webkit.org/show_bug.cgi?id=209146

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • runtime/JSCellInlines.h:

(JSC::CallFrame::deprecatedVM const): A reference may not be NULL, so
this ASSERT() can never trip.

Source/WebCore:

Warning fixes, no new tests.

  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::MediaKeys):

  • Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar

is platform-specific.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGLData::getStaticVBO):

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are

still virtual methods in this class, but no virtual destructor. Since
this won't be subclassed further (I doubt, anyway!) lets make it final
and plug the bug.

  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See

AudioCapturer.

  • platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:

(WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
(WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.

  • platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The

encoder was being used uninitialized, and hence codec support can not
be working as intended. Fix that bug.
(WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
(WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
(WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::setCookies):

  • rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa

platform where the crash is being seen. On GTK these traps generate
warning spam and we don't see the crash here.

  • rendering/RenderThemeAdwaita.h:
  • testing/Internals.cpp:

(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
(WebCore::Internals::getUTIFromMIMEType):
(WebCore::Internals::getUTIFromTag):

Source/WebDriver:

  • Session.cpp:

(WebDriver::Session::newWindow):
(WebDriver::Session::elementIsFileUpload):
(WebDriver::Session::elementIsEditable):
(WebDriver::Session::setInputFileUploadFiles):

Source/WebKit:

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

(WebKit::NetworkHTTPSUpgradeChecker::query):

  • NetworkProcess/NetworkLoadChecker.cpp: The m_isHTTPSUpgradeEnabled

ivar is only used on Cocoa platforms, on GTK it is causing warning
spam.
(WebKit::NetworkLoadChecker::NetworkLoadChecker):

  • NetworkProcess/NetworkLoadChecker.h:
  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::updateSceneState):
*
Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
m_inForceRepaint is not being used anymore.
(WebKit::ThreadedCompositor::forceRepaint):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • UIProcess/API/glib/WebKitNavigationClient.cpp:
  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler):

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h:

Source/WTF:

  • wtf/LoggerHelper.h: When the RELEASE_LOG is disabled, avoid warning

spam about unused channel names. Call sites often create locals for
the channel name outside of RELEASE_LOG ifdef's, which cause many
unused variable warnings.

Tools:

  • TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
  • TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:

(testDownloadMIMEType):
(testContextMenuDownloadActions):

  • TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:
8:17 AM WPE edited by Philippe Normand
(diff)
8:16 AM BuildingGtk edited by Philippe Normand
(diff)
8:12 AM WPE edited by Philippe Normand
(diff)
7:11 AM Changeset in webkit [258697] by commit-queue@webkit.org
  • 6 edits in trunk

onwebkit{animation, transition}XX handlers missing from Document
https://bugs.webkit.org/show_bug.cgi?id=206170
<rdar://problem/58596373>

Patch by Antoine Quint <Antoine Quint> on 2020-03-19
Reviewed by Youenn Fablet.

Source/WebCore:

We now specify the non-standard CSS Animations and CSS Transitions event handlers on DocumentAndElementEventHandlers.idl rather than Element.idl
such that they specified on both Element and Document.

  • dom/DocumentAndElementEventHandlers.idl:
  • dom/Element.idl:

LayoutTests:

  • fast/dom/event-handler-attributes-expected.txt:
  • fast/dom/event-handler-attributes.html:
7:05 AM Changeset in webkit [258696] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Media controls numeric position value is not automatically updated during playback
https://bugs.webkit.org/show_bug.cgi?id=209051

Reviewed by Philippe Normand.

The time label is not updated because updateTime() thinks the media controls are hidden when not hovered, but
for audio elements the controls are always visible.

  • Modules/mediacontrols/mediaControlsAdwaita.js:

(Controller.prototype.controlsAreAlwaysVisible): Return true for audio elements.

7:03 AM Changeset in webkit [258695] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][WPE] REGRESSION(r258626): flatpak is used even when WEBKIT_JHBUILD is set
https://bugs.webkit.org/show_bug.cgi?id=209278

Reviewed by Philippe Normand.

This happens when using an external jhbuild, because shouldUseFlatpak() assumes that no command prefix always
means flatpak.

  • Scripts/webkitdirs.pm:

(shouldUseFlatpak): Return early if WEBKIT_JHBUILD is set.

6:27 AM Changeset in webkit [258694] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[CMake] cache not cleared when build-webkit options change
https://bugs.webkit.org/show_bug.cgi?id=209277

Patch by Philippe Normand <pnormand@igalia.com> on 2020-03-19
Reviewed by Adrian Perez de Castro.

  • Scripts/webkitdirs.pm:

(shouldRemoveCMakeCache): The expected function signature never
included the cache file path. Remove it.

5:06 AM Changeset in webkit [258693] by eocanha@igalia.com
  • 6 edits in trunk

[GTK] media/track/track-automatic-subtitles.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=116957

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Moved CaptionUserPreferencesMediaAF::textTrackSelectionScore() implementation
to the CaptionUserPreferencesMedia superclass.

Tested by existing test.

  • page/CaptionUserPreferences.cpp:

(WebCore::CaptionUserPreferences::textTrackSelectionScore const):

  • page/CaptionUserPreferencesMediaAF.cpp:
  • page/CaptionUserPreferencesMediaAF.h:

LayoutTests:

Removed test from expectations.

  • platform/gtk/TestExpectations:
4:39 AM Changeset in webkit [258692] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

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

Unreviewed gardening.

Gardening of several WPT's css-writing-modes tests that were added for
the first time in r258661.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
3:26 AM Changeset in webkit [258691] by Philippe Normand
  • 6 edits in trunk/Source

[GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support

Source/WebCore:

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

Source/WTF:

  • wtf/Logger.h:

(WTF::Logger::logAlwaysVerbose const):

3:15 AM Changeset in webkit [258690] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Cherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
https://bugs.webkit.org/show_bug.cgi?id=209204
<rdar://problem/59362671>

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

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:
2:50 AM Changeset in webkit [258689] by Philippe Normand
  • 2 edits in trunk/Tools

REGRESSION(r258626): webkit-dirs warning
https://bugs.webkit.org/show_bug.cgi?id=209221

Reviewed by Adrian Perez de Castro.

  • Scripts/webkitdirs.pm:

(buildCMakeProjectOrExit): Fix Perl Warning. 😎

2:12 AM Changeset in webkit [258688] by graouts@webkit.org
  • 1 edit
    2 deletes in trunk/LayoutTests

Unreviewed test gardening.

These two platform-specific expectations are no longer necessary since we silenced the console output for these tests (see bugs 192974 and 194309).

  • platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt: Removed.
  • platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt: Removed.
2:02 AM Changeset in webkit [258687] by Chris Lord
  • 2 edits in trunk/Tools

Add Chris Lord (Chris Lord) to the list of contributors
https://bugs.webkit.org/show_bug.cgi?id=209274

Unreviewed

  • Scripts/webkitpy/common/config/contributors.json:
1:57 AM Changeset in webkit [258686] by fred.wang@free.fr
  • 1 edit
    1 delete in trunk/LayoutTests

Delete accidentally committed file.
https://bugs.webkit.org/show_bug.cgi?id=209178

Unreviewed.

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-19

1:29 AM Changeset in webkit [258685] by youenn@apple.com
  • 30 edits in trunk/Source

Make URL::path() return a StringView
https://bugs.webkit.org/show_bug.cgi?id=209173

Reviewed by Alex Christensen.

Source/WebCore:

Update code according new path return type.

  • Modules/plugins/YouTubePluginReplacement.cpp:

(WebCore::processAndCreateYouTubeURL):
(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):

  • html/Autofill.cpp:

(WebCore::AutofillData::createFromHTMLFormControlElement):

  • html/URLUtils.h:

(WebCore::URLUtils<T>::pathname const):

  • loader/FormSubmission.cpp:

(WebCore::appendMailtoPostFormDataToURL):

  • loader/appcache/ManifestParser.cpp:

(WebCore::manifestPath):

  • page/Location.cpp:

(WebCore::Location::pathname const):

  • page/UserContentURLPattern.cpp:

(WebCore::MatchTester::MatchTester):
(WebCore::UserContentURLPattern::matchesPath const):

  • page/csp/ContentSecurityPolicySource.cpp:

(WebCore::ContentSecurityPolicySource::pathMatches const):

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::searchCookies):
(WebCore::CookieJarDB::deleteCookie):

  • platform/network/curl/CookieUtil.cpp:

(WebCore::CookieUtil::defaultPathForURL):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::invokeDidReceiveResponseForFile):

  • platform/text/TextEncoding.cpp:

(WebCore::decodeURLEscapeSequences):

  • platform/text/TextEncoding.h:
  • workers/WorkerLocation.cpp:

(WebCore::WorkerLocation::pathname const):

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::addRegistration):

  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::validateServiceWorkerResponse):

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::doPushChanges):

Source/WebKit:

Update code according new path return type.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didSendRequest):

  • Shared/API/APIURL.h:

(API::URL::path const):

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkitURISchemeRequestReadCallback):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::objectContentType):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createPlugin):

Source/WebKitLegacy/mac:

  • Misc/WebNSURLExtras.mm:

(-[NSString _webkit_stringByReplacingValidPercentEscapes]):

Source/WTF:

  • wtf/URL.cpp:

(WTF::URL::path const):

  • wtf/URL.h:
  • wtf/text/StringView.h:

(WTF::startsWithLettersIgnoringASCIICase):
Add an overload for StringView.

1:14 AM Changeset in webkit [258684] by Megan Gardner
  • 5 edits in trunk/Source

Correctly set up context for Data Detectors
https://bugs.webkit.org/show_bug.cgi?id=209258
Source/WebCore/PAL:

Reviewed by Tim Horton.

  • pal/spi/ios/DataDetectorsUISPI.h:

Source/WebKit:

<rdar://problem/60612327>

Reviewed by Tim Horton.

Stop passing in a nil context. This is OK now, but won't be in the near future.
Also, call -updateContext:withSourceRect: so that DataDetectors can populate the context appropriately.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dataDetectionContextForPositionInformation:]):

12:04 AM Changeset in webkit [258683] by Ryan Haddad
  • 2 edits in trunk/Tools

Remove commit queue bubble from bot watchers dashboard
https://bugs.webkit.org/show_bug.cgi?id=209271

Reviewed by Alexey Proskuryakov.

Remove commit queue bubble from bot watchers dashboard now that it has moved to the new EWS.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:

(BubbleQueueServer):

Note: See TracTimeline for information about the timeline view.