Timeline



Mar 15, 2021:

11:55 PM Changeset in webkit [274467] by commit-queue@webkit.org
  • 5 edits in trunk

Fix table-element-001.html
https://bugs.webkit.org/show_bug.cgi?id=223063

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-15
Reviewed by Simon Fraser.

Source/WebCore:

The aspect-ratio property should not apply to table boxes [1].
Tables themselves should respect the property.

[1] https://drafts.csswg.org/css-sizing-4/#aspect-ratio

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalHeight const):
(WebCore::RenderBox::shouldIgnoreAspectRatio const):
(WebCore::RenderBox::shouldComputeLogicalHeightFromAspectRatio const):
(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):

  • rendering/RenderBox.h:

LayoutTests:

Enable test that passes now.

10:55 PM Changeset in webkit [274466] by Nikita Vasilyev
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: remove experimental setting and enable Layout sidebar
https://bugs.webkit.org/show_bug.cgi?id=221246
<rdar://problem/74130753>

Reviewed by BJ Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Views/ElementsTabContentView.js:

(WI.ElementsTabContentView):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

10:08 PM Changeset in webkit [274465] by Patrick Angle
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles sidebar pseudo-class checkboxes appear cramped after resizing window at narrow widths
https://bugs.webkit.org/show_bug.cgi?id=222990

Reviewed by Devin Rousso.

Fixed two compounding bugs that meant that a sidebar could end up using the base minimum width of 250px
instead of the actual minimum width as reported by the selected panel.

  • UserInterface/Views/MultiSidebar.js:

(WI.MultiSidebar.prototype.didInsertSidebarPanel):
(WI.MultiSidebar.prototype.didRemoveSidebarPanel):
(WI.MultiSidebar.prototype.didSetCollapsed):

  • Drive-by: Remove unused (and always undefined) flag argument.

(WI.MultiSidebar.prototype._updateMinimumWidthForMultipleSidebars):

  • Add logic to make sure we can calculate a valid _minimumWidthForMultipleSidebars, and add a mechanism to

allow ignoring the presence of a cached value to force a recalculation.
(WI.MultiSidebar.prototype.get _hasWidthForMultipleSidebars):

  • Ensure if possible that there is a valid _minimumWidthForMultipleSidebars.

(WI.MultiSidebar.prototype._makeSidebarPanelExclusive):

  • Sets the sidebar as non-collapsible (which sets collapsed to false) before adding the panel and setting it

as the selected panel so that we don't set the selected panel on a collapsed sidebar.

  • UserInterface/Views/SingleSidebar.js:

(WI.SingleSidebar.prototype.didSetCollapsed):

  • Drive-by: Remove always undefined flag argument, use this.collapsed instead.
9:33 PM Changeset in webkit [274464] by Patrick Angle
  • 7 edits in trunk/Source/WebCore

Web Inspector: Grid overlay does not adjust for element inside iframes
https://bugs.webkit.org/show_bug.cgi?id=222920

Reviewed by Simon Fraser.

Resolves an issue when overlays are applied to grids within iframes, which need to account for the
position/transform of their containing frame, and any other parent frames, to appear correctly in relation to
the root frame. This patch also has the side effect of changing how drawing the grid overlay while the page is
scrolled by allowing localPointToRootPoint to account for the scroll translation instead of explicitly
offsetting drawing by the scroll offset.

Widget, ScrollView, and FrameView are updated to retain floating-point precision where necessary.

  • inspector/InspectorOverlay.cpp:

(WebCore::localPointToRootPoint):

  • Use floating-point precision instead of integer precision.

(WebCore::InspectorOverlay::drawGridOverlay):

  • Use localPointToRootPoint to calculate absolute points relative to a renderGrid's parent hierarchy.
  • Remove graphics context translation, as localPointToRootPoint will account for this translation.
  • page/FrameView.cpp:

(WebCore::FrameView::convertFromRendererToContainingView const):
(WebCore::FrameView::convertToContainingView const):

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

(WebCore::ScrollView::contentsToView const):

  • platform/ScrollView.h:

(WebCore::ScrollView::convertChildToSelf const):

  • platform/Widget.cpp:

(WebCore::Widget::convertToContainingView const):

8:54 PM Changeset in webkit [274463] by commit-queue@webkit.org
  • 5 edits in trunk

REGRESSION: (r255611) [ Mac ] 3 lldb tests failing related to HashMap
https://bugs.webkit.org/show_bug.cgi?id=207204

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-15
Reviewed by Simon Fraser.

Source/WTF:

  • wtf/HashTable.h:

Tools:

In r255780 I removed WebKit LLDB support for HashTables because the LLDB python API doesn't have a way to
do the equivalent of reinterpret_cast. With clever use of a union, I can get a pointer to the table and
tell LLDB it is actually a pointer to an unsigned integer array. Then, using pointer->unsigned->pointer
transformations I can dereference a negative index. It's gross, but it works and makes the tests pass again.

  • lldb/lldb_webkit.py:

(lldb_init_module):
(
lldb_init_module.lldb_webkit):
(WTFHashTable_SummaryProvider):
(WTFHashMap_SummaryProvider):
(WTFHashSet_SummaryProvider):
(WTFHashMapProvider):
(WTFHashMapProvider.init):
(WTFHashMapProvider.tableSize):
(WTFHashMapProvider.keyCount):
(WTFHashSetProvider):
(WTFHashSetProvider.init):
(WTFHashSetProvider.tableSize):
(WTFHashSetProvider.keyCount):
(WTFHashTableProvider):
(WTFHashTableProvider.init):
(WTFHashTableProvider.metadataWithIndex):
(WTFHashTableProvider.tableSize):
(WTFHashTableProvider.keyCount):
(WTFHashTableProvider.num_children):
(WTFHashTableProvider.get_child_index):
(WTFHashTableProvider.get_child_at_index):
(WTFHashTableProvider.update):
(WTFHashTableProvider.has_children):

  • lldb/lldb_webkit_unittest.py:

(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):

8:24 PM Changeset in webkit [274462] by Chris Dumez
  • 18 edits
    2 deletes in trunk/Source/WebKit

Unreviewed, revert r272629 as it caused regressions in some apps
https://bugs.webkit.org/show_bug.cgi?id=223232
<rdar://75440378>

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:
  • UIProcess/Cocoa/WKBlankOverlayView.h: Removed.
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):

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

(WebKit::WebPageProxy::didCommitLayerTree):

  • UIProcess/mac/WebPageProxyMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::updateRendering):

  • WebProcess/WebPage/mac/WebPageMac.mm:
8:07 PM Changeset in webkit [274461] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Optimize canvas repaints
https://bugs.webkit.org/show_bug.cgi?id=223056

Reviewed by Said Abou-Hallawa.

Currently many draw operations in a canvas trigger a repaint via the didDraw()
code path which goes to HTMLCanvasElement::didDraw(). HTMLCanvasElement did track
a dirty rect and short-circuited repaints which were already dirty, but we paid
the cost of computing the dirty rect (e.g. getting the bounds of a path), and of
the hash lookup in Document::prepareCanvasesForDisplayIfNeeded() every time.

Optimize this by moving the dirty rect tracking into CanvasRenderingContext2DBase.
If the entire canvas is already dirty, we can avoid all the work (this is common,
since pages often clear the entire canvas at the start of every frame). Otherwise,
accumulate into m_dirtyRect. m_dirtyRect is cleared when we paint the canvas.

It would be nice to share more of the didDraw() code in CanvasRenderingContext2DBase
functions, but we want to be able to compute the dirty rect only if it's used, and
a WTF::function()-based approach benchmarked as slower.

This patch is an up-to-10% progression on some canvas subtests in MotionMark.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::didDraw):
(WebCore::HTMLCanvasElement::paint):

  • html/HTMLCanvasElement.h:
  • html/canvas/CanvasRenderingContext.h:

(WebCore::CanvasRenderingContext::clearAccumulatedDirtyRect):
(WebCore::CanvasRenderingContext::paintRenderingResultsToCanvas):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::fillInternal):
(WebCore::CanvasRenderingContext2DBase::strokeInternal):
(WebCore::CanvasRenderingContext2DBase::fillRect):
(WebCore::CanvasRenderingContext2DBase::strokeRect):
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::didDraw):
(WebCore::CanvasRenderingContext2DBase::clearAccumulatedDirtyRect):
(WebCore::CanvasRenderingContext2DBase::isEntireBackingStoreDirty const):
(WebCore::CanvasRenderingContext2DBase::putImageData):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

  • html/canvas/CanvasRenderingContext2DBase.h:

(WebCore::CanvasRenderingContext2DBase::didDraw):
(WebCore::CanvasRenderingContext2DBase::backingStoreBounds const):

8:03 PM Changeset in webkit [274460] by jer.noble@apple.com
  • 7 edits
    1 add in trunk

[WK2] Can get stuck in fullscreen mode if node is removed prior to receiving willEnterFullscreen()
https://bugs.webkit.org/show_bug.cgi?id=223218
<rdar://75009548>

Reviewed by Eric Carlson.

Source/WebCore:

Return false from the following functions if a preflight check kept the function
from completing.

  • dom/FullscreenManager.cpp:

(WebCore::FullscreenManager::willEnterFullscreen):
(WebCore::FullscreenManager::didEnterFullscreen):
(WebCore::FullscreenManager::willExitFullscreen):
(WebCore::FullscreenManager::didExitFullscreen):

  • dom/FullscreenManager.h:

Source/WebKit:

There are a number of preflight checks made in each of the listed functions below,
and those preflights can corrupt the state machine of the UIProcess's fullscreen
code. If any of the preflights fail, use the new return value of those methods to
close() the fullscreen presentation.

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::willEnterFullScreen):
(WebKit::WebFullScreenManager::didEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):
(WebKit::WebFullScreenManager::requestExitFullScreen):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenRemoveNodeBeforeEnter.mm: Added.

(TestWebKitAPI::TEST):

7:01 PM Changeset in webkit [274459] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Avoid heap allocation in RemoteAudioDestinationProxy::renderQuantum()
https://bugs.webkit.org/show_bug.cgi?id=223228

Reviewed by Darin Adler.

Avoid heap allocation in RemoteAudioDestinationProxy::renderQuantum() since this runs on the
audio thread.

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::connectToGPUProcess):
(WebKit::RemoteAudioDestinationProxy::renderQuantum):

6:57 PM Changeset in webkit [274458] by Chris Dumez
  • 3 edits in trunk/Source/WTF

RunLoop::isMain() should not need to do any heap allocations
https://bugs.webkit.org/show_bug.cgi?id=223227

Reviewed by Darin Adler.

RunLoop::isMain() should not need to do any heap allocations. Before this change,
calling RunLoop::isMain() on a non-main thread would call RunLoop::current() which
would allocate the RunLoop for the current thread. This is inefficient and an issue
for WebAudio since we're not allowed to do heap allocation on the audio rendering
thread.

  • wtf/RunLoop.cpp:

(WTF::RunLoop::runLoopHolder):
(WTF::RunLoop::current):
(WTF::RunLoop::isMain):

  • wtf/RunLoop.h:
6:25 PM Changeset in webkit [274457] by Wenson Hsieh
  • 15 edits
    2 adds in trunk

[iOS] WebPageProxy's EditorState may be stale until the next remote layer tree commit
https://bugs.webkit.org/show_bug.cgi?id=223207
<rdar://problem/75410700>

Reviewed by Tim Horton.

Source/WebKit:

Fixes a race condition wherein it's possible for the cached EditorState in the UI process (on WebPageProxy)
to be set to a stale (older) value after being set to a newer value. This can happen in the case where:

  1. An editor state update is computed and set on a remote layer tree transaction in the web process, inside

WebPage::willCommitLayerTree. A pending BackingStoreFlusher is created, and we dispatch a task onto a
background queue to flush the layer tree commit.

  1. IPC that updates the selection arrives in the web process (e.g. WebPage::selectTextWithGranularityAtPoint),

and causes us to send an EditorStateChanged message to the UI process with this new selection.

  1. The pending BackingStoreFlusher created in step (1) dispatches on the background queue, and sends its

editor state over to the UI process.

As a result, the UI process receives the EditorStateChanged message in step (2) before it receives the remote
layer tree transaction sent in step (3), which contains the editor state computed prior to step (2); we then set
WebPageProxy::m_editorState from its value computed in step (2) to the value computed in step (1).

To fix this (and any similar issues involving out-of-band editor state updates), we introduce a monotonically
increasing transaction ID on editor state that's similar to the one used for remote layer tree commits; we then
avoid updating the editor state in WebPageProxy if we receive an EditorState whose transaction ID is less
than our current ID.

Test: fast/images/image-extraction/ios/reselect-word-in-image-overlay.html

  • Shared/EditorState.cpp:

(WebKit::EditorState::encode const):
(WebKit::EditorState::decode):

  • Shared/EditorState.h:

Add the TransactionID, and add encoding/decoding support for the new member.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::updateEditorState):

Refactor this to return a bool, indicating whether the editor state was modified (this only returns false in
the case where the incoming editor state was older than the one we currently have). We also make this method
platform-agnostic, and move the platform-dependent logic previously implemented by individual updateEditorState
implementations into WebPageProxy::didUpdateEditorState instead.

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

(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::updateEditorState): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didUpdateEditorState):

Add a new platform method hook that is called when m_editorState is updated due to an incoming EditorState
from the web process. The old and new cached EditorState values are passed into this method; note that even
though only the previous value is necessary as an argument (since m_editorState is already equal to the new
value here), I chose to pass in both to make it clear that both old and new values can be consulted here.

(WebKit::WebPageProxy::updateEditorState): Deleted.

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::updateEditorState): Deleted.

  • UIProcess/playstation/WebPageProxyPlayStation.cpp:

(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::updateEditorState): Deleted.

  • UIProcess/win/WebPageProxyWin.cpp:

(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::updateEditorState): Deleted.

  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::updateEditorState): Deleted.

Rename these method implementations, and adjust them to use oldEditorState and newEditorState.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::editorState const):

  • WebProcess/WebPage/WebPage.h:

LayoutTests:

  • fast/images/image-extraction/ios/reselect-word-in-image-overlay-expected.txt: Added.
  • fast/images/image-extraction/ios/reselect-word-in-image-overlay.html: Added.
5:52 PM Changeset in webkit [274456] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[Multi-column] Ignore line grid offset when the grid line is shorter than 0.5px
https://bugs.webkit.org/show_bug.cgi?id=223220
<rdar://73192773>

Reviewed by Simon Fraser.

Source/WebCore:

This is a simple check on roundToInt(line box height) to make sure we don't divide by zero.

Test: fast/multicol/crash-when-line-grid-is-shorter-than-half-px.html

  • rendering/RenderLayoutState.cpp:

(WebCore::RenderLayoutState::computeLineGridPaginationOrigin):

  • rendering/RootInlineBox.h:

(WebCore::RootInlineBox::lineBoxHeight const):

LayoutTests:

  • fast/multicol/crash-when-line-grid-is-shorter-than-half-px-expected.txt: Added.
  • fast/multicol/crash-when-line-grid-is-shorter-than-half-px.html: Added.
5:37 PM Changeset in webkit [274455] by commit-queue@webkit.org
  • 10 edits in trunk

REGRESSION(r271642) Another app was relying on DOMWindow reuse
https://bugs.webkit.org/show_bug.cgi?id=223217
<rdar://75186172>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-15
Reviewed by Geoff Garen.

Source/WebCore:

We already fixed an app in r273817 but in rdar://75186172 we have another broken app.
It's time for a linkedOnOrAfter check.

  • bindings/js/JSWindowProxy.cpp:

(WebCore::JSWindowProxy::setWindow):

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(+[WKProcessPool _setLinkedOnOrBeforeEverythingForTesting]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

  • TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm:

(TestWebKitAPI::TEST):

5:24 PM Changeset in webkit [274454] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Debug ARM64 ] 2X w3c/svg tests are constantly text failing
https://bugs.webkit.org/show_bug.cgi?id=223223

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updating test expectations to constantly fail in Apple Silicon while test is being looked at.
4:44 PM Changeset in webkit [274453] by wilander@apple.com
  • 8 edits in trunk

PCM: Split attributionReportURL() into attributionReportSourceURL() and attributionReportAttributeOnURL()
https://bugs.webkit.org/show_bug.cgi?id=223210
<rdar://problem/75442246>

Reviewed by Brent Fulgham.

This patch splits WebCore::PrivateClickMeasurement::attributionReportURL() into
Source/WebCore:

PrivateClickMeasurement::attributionReportSourceURL() and
PrivateClickMeasurement::attributionReportAttributeOnURL() to
facilitate sending attribution reports to both the click source and destination.

No new tests. This patch doesn't change functionality and the functionality is
covered by existing tests.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

Changed the assertion to check both the attribution URLs.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::attributionReportURL):

Static convenience function to share code between
PrivateClickMeasurement::attributionReportSourceURL() and
PrivateClickMeasurement::attributionReportAttributeOnURL().

(WebCore::PrivateClickMeasurement::attributionReportSourceURL const):

Generates the well-known location for the click source.

(WebCore::PrivateClickMeasurement::attributionReportAttributeOnURL const):

Generates the well-known location for the click destination.

(WebCore::PrivateClickMeasurement::attributionReportURL const): Deleted.

No mostly exists as a static convenience function (see above).

  • loader/PrivateClickMeasurement.h:

Source/WebKit:

WebCore::PrivateClickMeasurement::attributionReportSourceURL() and
WebCore::PrivateClickMeasurement::attributionReportAttributeOnURL() to
facilitate sending attribution reports to both the click source and destination.

  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):

Removed a reference to ads in a log statement.

(WebKit::PrivateClickMeasurementManager::fireConversionRequestImpl):

Now uses WebCore::PrivateClickMeasurement::attributionReportSourceURL().

Tools:

WebCore::PrivateClickMeasurement::attributionReportSourceURL() and
WebCore::PrivateClickMeasurement::attributionReportAttributeOnURL() to
facilitate sending attribution reports to both the click source and destination.

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

Updated to use the new functions and also not repeat tests of static
data.

4:41 PM Changeset in webkit [274452] by Alan Coon
  • 3 edits in branches/safari-611.1.21.2-branch/Source/WebKit

Cherry-pick r274439. rdar://problem/75450678

Enforce subcommand filtering
https://bugs.webkit.org/show_bug.cgi?id=223192
<rdar://75434409>

Reviewed by Brent Fulgham.

Enforce subcommand filtering in the WebContent process' sandbox.

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

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

4:41 PM Changeset in webkit [274451] by Alan Coon
  • 3 edits in branches/safari-611.1.21.2-branch/Source/WebKit

Cherry-pick r274295. rdar://problem/75450678

[macOS] Add additional telemetry to WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=223080

Reviewed by Brent Fulgham.

Add additional telemetry to WebContent sandbox on macOS.

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

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

4:30 PM Changeset in webkit [274450] by Alan Coon
  • 3 edits in branches/safari-611.1.21.0-branch/Source/WebKit

Cherry-pick r274439. rdar://problem/75450660

Enforce subcommand filtering
https://bugs.webkit.org/show_bug.cgi?id=223192
<rdar://75434409>

Reviewed by Brent Fulgham.

Enforce subcommand filtering in the WebContent process' sandbox.

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

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

4:30 PM Changeset in webkit [274449] by Alan Coon
  • 3 edits in branches/safari-611.1.21.0-branch/Source/WebKit

Cherry-pick r274295. rdar://problem/75450660

[macOS] Add additional telemetry to WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=223080

Reviewed by Brent Fulgham.

Add additional telemetry to WebContent sandbox on macOS.

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

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

4:29 PM Changeset in webkit [274448] by Alan Coon
  • 8 edits in branches/safari-611.1.21.2-branch/Source

Versioning.

WebKit-7611.1.21.2.3

4:26 PM Changeset in webkit [274447] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ MacOS wk2 ] inspector/debugger/breakpoints/resolved-dump-all-inline-script-pause-locations.html is flakey timing out
https://bugs.webkit.org/show_bug.cgi?id=221759

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Re-updating test expectations to include release. Prior test expectation update gave us unexpected crashes.
3:53 PM Changeset in webkit [274446] by Alan Coon
  • 8 edits in branches/safari-611.1.21.0-branch/Source

Versioning.

WebKit-7611.1.21.0.7

3:46 PM Changeset in webkit [274445] by Alan Coon
  • 3 edits in branches/safari-611.1.21.1-branch/Source/WebKit

Cherry-pick r274439. rdar://problem/75450672

Enforce subcommand filtering
https://bugs.webkit.org/show_bug.cgi?id=223192
<rdar://75434409>

Reviewed by Brent Fulgham.

Enforce subcommand filtering in the WebContent process' sandbox.

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

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

3:46 PM Changeset in webkit [274444] by Alan Coon
  • 2 edits in branches/safari-611.1.21.1-branch/Source/WebKit

Cherry-pick r274231. rdar://problem/75450672

Roll back in r274231 to avoid conflicts in r274439.

3:39 PM Changeset in webkit [274443] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

Image overlay creation should be idempotent
https://bugs.webkit.org/show_bug.cgi?id=223199

Reviewed by Tim Horton.

Source/WebCore:

Make sure that updateWithImageExtractionResult is idempotent given the same results object, and does not
inject redundant styles or DOM elements in the user agent shadow root.

Test: fast/images/image-extraction/image-overlay-creation-is-idempotent.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

When updating the image overlay, remove the existing overlay container element if needed, and don't bother
re-injecting the style sheet if it has already been created and inserted.

LayoutTests:

  • fast/images/image-extraction/image-overlay-creation-is-idempotent-expected.txt: Added.
  • fast/images/image-extraction/image-overlay-creation-is-idempotent.html: Added.
3:25 PM Changeset in webkit [274442] by Alan Coon
  • 8 edits in branches/safari-611.1.21.1-branch/Source

Versioning.

WebKit-7611.1.21.1.10

3:06 PM Changeset in webkit [274441] by aakash_jain@apple.com
  • 1 edit
    1 delete in trunk/Tools

Delete unused build-launcher-dmg script
https://bugs.webkit.org/show_bug.cgi?id=222923

Reviewed by Alexey Proskuryakov.

  • CISupport/build-launcher-dmg: Removed.
2:27 PM Changeset in webkit [274440] by Alan Bujtas
  • 3 edits
    2 adds in trunk

RenderStyle::getRoundedInnerBorderFor should never produce a rect with negative width/height
https://bugs.webkit.org/show_bug.cgi?id=223147

Reviewed by Simon Fraser.

Source/WebCore:

Width/height may get resolved to negative values when the rect goemetry (left/top) is at maximum LayoutUnit.

Test: fast/shapes/assert-when-rounded-rect-overflows.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::getRoundedInnerBorderFor const):

LayoutTests:

  • fast/shapes/assert-when-rounded-rect-overflows-expected.txt: Added.
  • fast/shapes/assert-when-rounded-rect-overflows.html: Added.
2:22 PM Changeset in webkit [274439] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Enforce subcommand filtering
https://bugs.webkit.org/show_bug.cgi?id=223192
<rdar://75434409>

Reviewed by Brent Fulgham.

Enforce subcommand filtering in the WebContent process' sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
1:49 PM Changeset in webkit [274438] by ysuzuki@apple.com
  • 4 edits
    2 adds in trunk

WebGL should be aware of [AllowShared]
https://bugs.webkit.org/show_bug.cgi?id=223167

Reviewed by Saam Barati.

Source/WebCore:

This patch attaches [AllowShared] IDL annotations to appropriate WebGL types, so that these functions
can accept array buffers / array buffer views which are created from SharedArrayBuffer.

  • html/canvas/WebGL2RenderingContext.idl:
  • html/canvas/WebGLRenderingContextBase.idl:

LayoutTests:

Test that these functions accept (not throwing a TypeError) array buffers etc. created from SharedArrayBuffer.

  • webgl/webgl-allow-shared-expected.txt: Added.
  • webgl/webgl-allow-shared.html: Added.
1:45 PM Changeset in webkit [274437] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Do not collapse the anonymous block when it is a candidate container for the list marker
https://bugs.webkit.org/show_bug.cgi?id=223196
<rdar://74574330>

Reviewed by Antti Koivisto.

Do not merge empty anonymous siblings when the callers says "do not collpase anonymous block". Those merge candidate
anonymous blocks may be candidate containers for some other conent (we expand on r238119 here).

  • rendering/updating/RenderTreeBuilderBlock.cpp:

(WebCore::RenderTreeBuilder::Block::detach):

1:43 PM Changeset in webkit [274436] by Simon Fraser
  • 19 edits in trunk/Source/WebCore

Change canvasChanged() to take a Optional<FloatRect>
https://bugs.webkit.org/show_bug.cgi?id=223203

Reviewed by Said Abou-Hallawa.

As a precursor to webkit.org/b/223056, change the FloatRect argument to
canvasChanged() to be an Optional<FloatRect>. A nullopt value here indicates
that the changed rect is inside the existing dirtied bounds of the canvas backing
store since the last repaint, so clients that are using the callback for repaint
don't need to do anything.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/webxr/WebXRWebGLLayer.h:
  • css/CSSCanvasValue.cpp:

(WebCore::CSSCanvasValue::canvasChanged):

  • css/CSSCanvasValue.h:
  • dom/Document.cpp:

(WebCore::Document::canvasChanged):

  • dom/Document.h:
  • html/CanvasBase.cpp:

(WebCore::CanvasBase::notifyObserversCanvasChanged):

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

(WebCore::HTMLCanvasElement::didDraw):

  • html/HTMLCanvasElement.h:
  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::didDrawEntireCanvas):
(WebCore::CanvasRenderingContext2DBase::paintRenderingResultsToCanvas):

  • html/canvas/CanvasRenderingContext2DBase.h:

(WebCore::CanvasRenderingContext2DBase::backingStoreBounds const):

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::canvasChanged):

  • inspector/agents/InspectorCanvasAgent.h:
1:38 PM Changeset in webkit [274435] by jer.noble@apple.com
  • 10 edits in trunk/Source

[Cocoa] Adopt AudioComponentApplyServerRegistrations()
https://bugs.webkit.org/show_bug.cgi?id=223188
<rdar://75433850>

Reviewed by Eric Carlson.

Source/WebCore/PAL:

  • pal/cf/AudioToolboxSoftLink.cpp:
  • pal/cf/AudioToolboxSoftLink.h:

Source/WebKit:

The WebKit sandbox will block access to the AudioComponent XPC service when the
GPU process is enabled. Adopt new API to fetch the registered component data from
the priviledged UIProcess and consume that registration data in the WebContent
process, making it unnecessary to communicate with the AudioComponent XPC service
to instantiate components.

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::sendAudioComponentRegistrations):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • UIProcess/WebProcessProxy.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::consumeAudioComponentRegistrations):

1:11 PM Changeset in webkit [274434] by Said Abou-Hallawa
  • 8 edits in trunk/LayoutTests

Enable the layout test 2d.path.stroke.scale2.html
https://bugs.webkit.org/show_bug.cgi?id=223176

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2-expected.txt:

LayoutTests:

This layout test is now fixed on macOS and iOS after enabling GPUP for
2D canvas rendering. The reason is CGPathAddRect() has a bug which is
tracked by rdar://75419465. Encoding the CGPath converts the rectangle
command to moveTo and lineTo commands. This is unintentional workaround
for the CGPathAddRect() bug.

  • TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
1:02 PM Changeset in webkit [274433] by commit-queue@webkit.org
  • 30 edits in trunk

WebGL IPC should use shared memory for synchronous messages
https://bugs.webkit.org/show_bug.cgi?id=220974
<rdar://problem/73876947>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-15
Reviewed by Geoffrey Garen.

Source/WebKit:

Send synchronous messages via the stream shared memory.
Improves MotionMark on iMac1,1 from 5000 to ~5300 pts.

If the message is encodable as a value, try to do so.
If the reply is encodable as a value, try to do so.
A message or a reply is not encodable if an argument in the message
must be passed by reference via the OS specific mechanism
(e.g. a iosurface or a file handle cannot be sent as a value).

Similar to asynchronous messages, if the synchronous message fits to
the stream buffer, the message is sent via the buffer. Same with the
reply.

If the message or reply is not sent via the stream buffer, it is sent via
the normal IPC.

The client protocol is:
1) Write the message to the buffer and release it.
2) Wait until the server releases the whole buffer back to the client.
3) Read the reply from index 0.
4) Continue sending next message from index 0.

The server protocol is upon receiving a message that is synchronous:
1) Read the message from the message position, dispatch it.
2) Write the reply to index 0.
3) Release the whole buffer back to the client.
4) Continue reading next message from index 0.

The client will not know at the send time whether the server will reply
via the stream or via normal IPC message. The client will reserve
a IPC sync request ID for normal IPC reply purposes.

In case a message or a reply does not fit to the stream buffer, the
ProcessOutOfStreamMessage message is written to the buffer instead.
This will make the reader to wait for the normal IPC message.

Changes temporarily so that the creation of the context waits for the
confirmation that the creation was done. This is due to synchrononous
stream send unable to deliver the WasCreated message during
wait for reply, at the moment.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • Platform/IPC/ArgumentCoder.h:
  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/Connection.cpp:

(IPC::Connection::createSyncMessageEncoder):
(IPC::Connection::pushPendingSyncRequestID):
(IPC::Connection::popPendingSyncRequestID):
(IPC::Connection::sendSyncMessage):

  • Platform/IPC/Connection.h:

(IPC::Connection::makeSyncRequestID):
Move the code from sendSyncMessage to individual functions so
that the client can reserve a sync request ID for reply purposes.

  • Platform/IPC/StreamClientConnection.h:

(IPC::StreamClientConnection::send):
(IPC::StreamClientConnection::trySendStream):
(IPC::StreamClientConnection::sendSync):
(IPC::StreamClientConnection::trySendSyncStream):
(IPC::StreamClientConnection::tryAcquireAll):

  • Platform/IPC/StreamConnectionBuffer.h:
  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnectionBase::acquireAll):
(IPC::StreamServerConnectionBase::release):
(IPC::StreamServerConnectionBase::releaseAll):

  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnectionBase::sendSyncReply):
The implementation.

(IPC::StreamServerConnectionBase::tryAcquire):
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessages):
Fix a typo StreamServerConnectionBase::tryAquire

(IPC::StreamServerConnection<Receiver>::dispatchStreamMessage):
If the message comes in as normal IPC message, it must be replied
via normal IPC.

Add a flag m_isDispatchingStreamMessage to indicate whether the
message being processed comes as a normal IPC message or a
stream message. This information must be stateful in the connection
class, as it is not passable as arguments when the execution goes through:

StreamServerConnection<Receiver>::dispatchStreamMessage()
Receiver::didReceiveStreamMessage()
handleMessageSynchronous()
StreamServerConnection<Receiver>::sendSyncReply()

  • Scripts/webkit/messages.py:

Add properties NotStreamEncodable, NotStreamEncodableReply
that indicate if the message parameters are such that they
cannot be encoded into plain data buffer as values.
This is encoded as 'constexpr bool isStreamEncodable' and
'constexpr bool isStreamEncodableReply' for the stream messages.

  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::messageArgumentDescriptions):

  • Scripts/webkit/tests/MessageNames.cpp:

(IPC::description):
(IPC::receiverName):
(IPC::isValidMessageName):

  • Scripts/webkit/tests/MessageNames.h:
  • Scripts/webkit/tests/TestWithIfMessageMessages.h:
  • Scripts/webkit/tests/TestWithImageDataMessages.h:
  • Scripts/webkit/tests/TestWithLegacyReceiverMessages.h:
  • Scripts/webkit/tests/TestWithSemaphoreMessages.h:
  • Scripts/webkit/tests/TestWithStream.messages.in:
  • Scripts/webkit/tests/TestWithStreamBufferMessages.h:
  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(WebKit::TestWithStream::didReceiveStreamMessage):

  • Scripts/webkit/tests/TestWithStreamMessages.h:

(Messages::TestWithStream::SendMachSendRight::name):
(Messages::TestWithStream::SendMachSendRight::SendMachSendRight):
(Messages::TestWithStream::SendMachSendRight::arguments const):
(Messages::TestWithStream::ReceiveMachSendRight::name):
(Messages::TestWithStream::ReceiveMachSendRight::arguments const):
(Messages::TestWithStream::SendAndReceiveMachSendRight::name):
(Messages::TestWithStream::SendAndReceiveMachSendRight::SendAndReceiveMachSendRight):
(Messages::TestWithStream::SendAndReceiveMachSendRight::arguments const):

  • Scripts/webkit/tests/TestWithSuperclassMessages.h:
  • Scripts/webkit/tests/TestWithoutAttributesMessages.h:

Test changes related to NotStreamEncodable, NotStreamEncodableReply.

Other changes indicate an auxiliary change to message structs:
changing 'const bool isSync' to 'constexpr bool isSync'.
This is done for consistency, since 'isStreamEncodable*' properties
are also added as constexpr.

  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:

Make types that are WebGL sync message parameters or reply parameters
now encodable to a stream by making the encoder part a template.
Previously these were sent only by normal IPC, and did not need
to be polymorphic to the encoder.

Tools:

Mark PrepareForDisplay() as "not replyable through the stream"
since it replies with MachSendRight.

  • Scripts/generate-gpup-webgl:
12:51 PM Changeset in webkit [274432] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Avoid doing a heap allocation in AudioParam::calculateFinalValues() on the audio thread
https://bugs.webkit.org/show_bug.cgi?id=223197
<rdar://60700260>

Reviewed by Jer Noble.

Avoid doing a heap allocation in AudioParam::calculateFinalValues() on the audio thread, for
performance reasons.

  • Modules/webaudio/AudioParam.cpp:

(WebCore::AudioParam::AudioParam):
(WebCore::AudioParam::calculateFinalValues):

  • Modules/webaudio/AudioParam.h:
12:34 PM Changeset in webkit [274431] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ARM64 ] http/tests/local/loading-stylesheet-import-remove.html is a flakey image failure
https://bugs.webkit.org/show_bug.cgi?id=223206

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass ImageOnlyFailure while test is being looked at.
12:32 PM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
12:28 PM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
11:54 AM Changeset in webkit [274430] by youenn@apple.com
  • 11 edits in trunk

Update getUserMedia delegate to expose frame info
https://bugs.webkit.org/show_bug.cgi?id=223178

Reviewed by Eric Carlson.

Source/WebKit:

Covered by API test.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
Expose frame information in the permission delegate.

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(-[UserMediaCaptureUIDelegateForParameters _webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:audio:video:decisionHandler:]):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:

(-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate _webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:audio:video:decisionHandler:]):
(-[NavigationWhileGetUserMediaPromptDisplayedUIDelegate _webView:requestMediaCapturePermission:video:decisionHandler:]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:

(-[SpeechRecognitionUIDelegate _webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:audio:video:decisionHandler:]):
(-[SpeechRecognitionUIDelegate _webView:requestMediaCapturePermission:video:decisionHandler:]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:

(-[UserMediaUIDelegate _webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:audio:video:decisionHandler:]):
(-[UserMediaUIDelegate _webView:requestMediaCapturePermission:video:decisionHandler:]): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:

(-[SimulateFailedSandboxUIDelegate _webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:audio:video:decisionHandler:]):
(-[SimulateFailedSandboxUIDelegate _webView:requestMediaCapturePermission:video:decisionHandler:]): Deleted.

  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate _webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:audio:video:decisionHandler:]):
(-[UserMediaCaptureUIDelegate _webView:requestMediaCapturePermission:video:decisionHandler:]): Deleted.

10:41 AM Changeset in webkit [274429] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Stop calling [NSHTTPCookieStorage sharedHTTPCookieStorage] in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=223186
<rdar://75018105>

Reviewed by Geoffrey Garen.

NetworkStorageSession::nsCookieStorage() was calling [NSHTTPCookieStorage sharedHTTPCookieStorage]
even if cookieStorage() is not nil. I updated the condition so that we do not attempt to call
[NSHTTPCookieStorage sharedHTTPCookieStorage] when the m_isInMemoryCookieStore flag is set. The
WebProcess is using an in-memory cookie store (thus has m_isInMemoryCookieStore flag set) and
is definitely not using the shared HTTP cookie store.

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::nsCookieStorage const):

10:38 AM Changeset in webkit [274428] by Angelos Oikonomopoulos
  • 2 edits in trunk/Source/JavaScriptCore

postprocess-asm/resolve-asm-file-conflicts.rb build failure after upgrading to F34
https://bugs.webkit.org/show_bug.cgi?id=223136

Reviewed by Michael Catanzaro.

When parsing .file assembler directives (for the purpose of
deduplicating the file slots), also accept

.file "path/to/CWD" "path/to/include"

that seems to be emitted by GCC in some configurations. This also
uses Pathname.cleanpath on the resulting path to canonicalize the
paths. We could use .realpath, but since we only run this on the
paths in a single compilation unit and the first component is
supposed to be the CWD, this both seems unnecessary and would
complicate our selftests.

  • Scripts/resolve-asm-file-conflicts.rb:
10:34 AM Changeset in webkit [274427] by Alan Coon
  • 1 copy in tags/Safari-612.1.5.5

Tag Safari-612.1.5.5.

10:30 AM Changeset in webkit [274426] by Alan Coon
  • 8 edits in branches/safari-612.1.5-branch/Source

Versioning.

WebKit-7612.1.5.5

10:02 AM Changeset in webkit [274425] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Add a WebAudio quirk for Zoom
https://bugs.webkit.org/show_bug.cgi?id=223180
<rdar://75070331>

Reviewed by Eric Carlson.

Manually tested.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAutoplayWebAudioForArbitraryUserGesture const):
This allows playing audio through web audio even in cases where microphone is not yet granted or denied.

9:44 AM Changeset in webkit [274424] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Turn CSS aspect-ratio on by default
https://bugs.webkit.org/show_bug.cgi?id=223117

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-15
Reviewed by Simon Fraser.

Turn CSS aspect-ratio on by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
9:42 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
9:39 AM Changeset in webkit [274423] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r233845): EME Keysystem permission when MediaStream is disabled
https://bugs.webkit.org/show_bug.cgi?id=223185

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-15
Reviewed by Eric Carlson.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestMediaKeySystemPermissionForFrame): This method is required for
EME build configurations, not MediaStream...

9:08 AM Changeset in webkit [274422] by Peng Liu
  • 7 edits in trunk

[GPUP][MSE] Add an IPC message to implement SourceBufferPrivateRemote::canSwitchToType()
https://bugs.webkit.org/show_bug.cgi?id=223152

Reviewed by Eric Carlson.

Source/WebKit:

Add a synchronous message to implement SourceBufferPrivateRemote::canSwitchToType().

No new tests. This patch fixes a test failure.

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:

(WebKit::RemoteSourceBufferProxy::canSwitchToType):

  • GPUProcess/media/RemoteSourceBufferProxy.h:
  • GPUProcess/media/RemoteSourceBufferProxy.messages.in:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::canSwitchToType):

LayoutTests:

  • platform/mac/TestExpectations:
8:52 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
8:20 AM Changeset in webkit [274421] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Fit-border-to-line may change the layout constraints between 2 paginated line layouts
https://bugs.webkit.org/show_bug.cgi?id=223169
<rdar://73147358>

Reviewed by Antti Koivisto.

Source/WebCore:

In paginated context, we keep triggering layout until all the widows/orphans are cleared.
This happens within the same layout frame (in practice this is a recursive call in
RenderBlockFlow::layoutBlock -see relayoutToAvoidWidows).
The constraints for these subsequent/recursive layouts should stay the same in order
to be able to clear any potential widows/orphans
(e.g first layout produces 5 lines but we can only have 3 on this page due to the widow/orphan values.
Now the subsequent/recursive layout is going to break the content at the 3rd line,
but if the constraints change in between and this layout only produces 2 lines, we'll keep trying
until we manage to produce at least 3 lines. Fit-border-to-line implemented in such an intrusive way that
it overrides previously computed logical width (mutates the constraint) -see RenderBlockFlow::fitBorderToLinesIfNeeded)

This patch ensures that we bail out of the recursive re-layout if we fail to produce the same set of lines.

Test: fast/multicol/widow-relayout-with-border-fit.html

  • rendering/ComplexLineLayout.cpp:

(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):

LayoutTests:

  • fast/multicol/widow-relayout-with-border-fit-expected.txt: Added.
  • fast/multicol/widow-relayout-with-border-fit.html: Added.
6:36 AM Changeset in webkit [274420] by Wenson Hsieh
  • 5 edits
    5 adds in trunk

[macOS] Selecting text via mouse drag in image documents shouldn't trigger click events
https://bugs.webkit.org/show_bug.cgi?id=223075
<rdar://problem/75334611>

Reviewed by Tim Horton.

Source/WebCore:

Improve image overlay support in image documents, by setting -webkit-user-select: text; on the image overlay
container and cursor: text; on each of the text children. Additionally, make it so that text selection in
image overlays doesn't trigger a click event, so that attempting to select text doesn't trigger click events.

Tests: fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html

fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::isImageOverlayText):

Make a slight adjustment here to handle the case where the host element's shadow root is not installed by the
user agent, and also so that we return true for all nodes underneath the image overlay container as well (not
just text nodes). See DragController change below for more details.

(WebCore::HTMLElement::updateWithImageExtractionResult):

  • page/DragController.cpp:

(WebCore::DragController::draggableElement const):

Make another adjustment to DragController::draggableElement, such that we don't initiate image drags when
dragging over text inside the image overlay. Note that this does not prevent drag start when the text is
selected, since that does not result in an image drag (i.e., DragSourceAction::Image).

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateSelectionForMouseDrag):

LayoutTests:

Add a couple of new layout tests to exercise the new behavior.

  • fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt: Added.
  • fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html: Added.
  • fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html: Added.
  • fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html: Added.
6:18 AM Changeset in webkit [274419] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Treat min-intrinsic like *-content
https://bugs.webkit.org/show_bug.cgi?id=222854

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-15
Reviewed by Sergio Villar Senin.

Source/WebCore:

Treat min-intrinsic like *-content for intrinsic logical
content calculations.

Test: fast/flexbox/indefinite-width-crash.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing const):

LayoutTests:

Add test for this.

  • fast/flexbox/indefinite-width-crash-expected.txt: Added.
  • fast/flexbox/indefinite-width-crash.html: Added.
6:15 AM Changeset in webkit [274418] by Lauro Moura
  • 2 edits in trunk/Tools

[GLIB] Filter cppfilt output when generating crash logs
https://bugs.webkit.org/show_bug.cgi?id=223171

Reviewed by Carlos Garcia Campos.

Like the output from other external commands, the output of cppfilt
must also be decoded.

This should fix the early exits due to unicode exceptions when
running the GTK4 bot layout tests.

  • Scripts/webkitpy/port/linux_get_crash_log.py:

(GDBCrashLogGenerator.generate_crash_log): Decode cppfilt output.

6:15 AM Changeset in webkit [274417] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GLIB] Be more selective about bublewrapping libdirs
https://bugs.webkit.org/show_bug.cgi?id=221709

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-03-15
Reviewed by Carlos Garcia Campos.

On 32-bit systems, bubblewrap lib32 instead of lib64. This unbreaks
sandbox on some distributions that have lib32 (which glibc defaults
its ld cache lookups to) but configure default libdir to lib rather
than lib32.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bubblewrapSpawn):

6:00 AM Changeset in webkit [274416] by imanol
  • 12 edits
    1 add in trunk

Split WebXR features into enabledFeatures, supportedFeatures and requestedFeatures
https://bugs.webkit.org/show_bug.cgi?id=222796

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update xrSession_requestReferenceSpace_features expectations.

  • web-platform-tests/webxr/xrSession_requestReferenceSpace_features.https-expected.txt: Added.

Source/WebCore:

Currently enabledFeatures array is used both for checking supported and enabled features. This is causing some tests to fail,
such as "test that reference spaces that aren't default features are rejected when not requested as a feature".

This patchs splits WebXR features into:

  • enabledFeatures: features thas has been granted by the permission system.
  • supportedFeatures: features that the device supports.
  • requestedFeatures: specific features that have been enabled for a specific session.

Tested by xrSession_requestReferenceSpace_features.html

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::create):
(WebCore::WebXRSession::WebXRSession):
(WebCore::WebXRSession::referenceSpaceIsSupported const):

  • Modules/webxr/WebXRSession.h:
  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::resolveRequestedFeatures const):
(WebCore::WebXRSystem::resolveFeaturePermissions const):
(WebCore::WebXRSystem::requestSession):
(WebCore::WebXRSystem::DummyInlineDevice::DummyInlineDevice):

  • Modules/webxr/WebXRSystem.h:
  • platform/xr/PlatformXR.h:

(PlatformXR::Device::setSupportedFeatures):
(PlatformXR::Device::supportedFeatures const):

  • platform/xr/openxr/PlatformXROpenXR.cpp:

(PlatformXR::OpenXRDevice::collectSupportedFeatures):
(PlatformXR::OpenXRDevice::collectSupportedSessionModes):

  • platform/xr/openxr/PlatformXROpenXR.h:
  • testing/WebXRTest.cpp:

(WebCore::WebXRTest::simulateDeviceConnection):

LayoutTests:

Update xrSession_requestReferenceSpace_features expectations.

  • platform/wpe/TestExpectations:
6:00 AM Changeset in webkit [274415] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

CSS aspect-ratio interpolation
https://bugs.webkit.org/show_bug.cgi?id=220848

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-15
Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

Import relevant test.

  • web-platform-tests/css/css-sizing/animation/aspect-ratio-interpolation-expected.txt: Added.
  • web-platform-tests/css/css-sizing/animation/aspect-ratio-interpolation.html: Added.

Source/WebCore:

Implement CSS aspect-ratio interpolation as defined here:
https://drafts.csswg.org/css-values/#combine-ratio

Test: imported/w3c/web-platform-tests/css/css-sizing/animation/aspect-ratio-interpolation.html

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

5:45 AM Changeset in webkit [274414] by commit-queue@webkit.org
  • 17 edits in trunk/Source

Move vertex array functionality from ExtensionsGL to GraphicsContextGL
https://bugs.webkit.org/show_bug.cgi?id=221665

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-15
Reviewed by Simon Fraser.

Source/WebCore:

There's no benefit in using ExtensionsGL, it is just adding bugs.
This commit is working towards removing ExtensionsGL.

The vertex array functionality already exists in GraphicsContextGL, use
it from there.

In WebGL1 case, the OES extension is used.

In WebGL2 case, all the functions end up calling the same functionality
underneath, regardless if client calls WebGL2 function or WebGL1
extension function.

ANGLE GenVertexArrays is the same function as GenVertexArraysOES except
GenVertexArrays is not enabled for ES 2.0 contexts.

No new tests, tested by WebGL conformance.

  • html/canvas/OESVertexArrayObject.cpp:

(WebCore::OESVertexArrayObject::isVertexArrayOES):
(WebCore::OESVertexArrayObject::bindVertexArrayOES):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getParameter):

  • html/canvas/WebGLVertexArrayObjectOES.cpp:

(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
(WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):

  • platform/graphics/ExtensionsGL.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/ExtensionsGLANGLE.cpp:
  • platform/graphics/angle/ExtensionsGLANGLE.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::createVertexArray):
(WebCore::GraphicsContextGLOpenGL::deleteVertexArray):
(WebCore::GraphicsContextGLOpenGL::isVertexArray):
(WebCore::GraphicsContextGLOpenGL::bindVertexArray):

  • platform/graphics/opengl/ExtensionsGLOpenGL.cpp:

(WebCore::ExtensionsGLOpenGL::createVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::deleteVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::isVertexArrayOES):
(WebCore::ExtensionsGLOpenGL::bindVertexArrayOES):

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::createVertexArray):
(WebCore::GraphicsContextGLOpenGL::deleteVertexArray):
(WebCore::GraphicsContextGLOpenGL::isVertexArray):
(WebCore::GraphicsContextGLOpenGL::bindVertexArray):

Source/WebKit:

Generate WebGL GPUP implementation after the change.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(getGraphicsResetStatusARB):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
4:34 AM Changeset in webkit [274413] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

RemoteRenderingBackend commands are not processed in order if GPU process is waiting for replies
https://bugs.webkit.org/show_bug.cgi?id=222099

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-15
Reviewed by Simon Fraser.

Mark all asynchronous message sends with DispatchMessageEvenWhenWaitingForSyncReply.
Otherwise synchronous messages will be dispatched before asynchronous messages.
The messages are temporally dependent.

Consider initial message exchange in canvas-blending-color-over-image.html:
GPUConnectionToWebProcess_CreateRenderingBackend
RemoteRenderingBackend_CreateImageBuffer
RemoteRenderingBackend_DidCreateSharedDisplayListHandle
RemoteRenderingBackend_CreateImageBuffer
RemoteRenderingBackend_WakeUpAndApplyDisplayList
RemoteRenderingBackend_GetDataURLForImageBuffer
RemoteRenderingBackendProxy_DidCreateImageBufferBackend
RemoteRenderingBackendProxy_DidCreateImageBufferBackend

If GPU process is waiting for a sync reply when the sequence up
until GetDataURL.. arrives, then the dispatch order is:

GPUConnectionToWebProcess_CreateRenderingBackend
RemoteRenderingBackend_GetDataURLForImageBuffer

[... rest of the messages]

This is a rare case, affects only the case where:
1) These messages arrive before main thread processes the message queue
2) GPU process has sent a synchronous message and is waiting for a reply

In base case after RenderingBackend has been created and the work queue
receive queue has been installed, all messages are moved to the work
queue thread and dispatched in order of arrival.

No new tests, timing dependent and WebKit code cannot be
unit tested.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy):
(WebKit::RemoteRenderingBackendProxy::reestablishGPUProcessConnection):
(WebKit::RemoteRenderingBackendProxy::createImageBuffer):
(WebKit::RemoteRenderingBackendProxy::cacheNativeImage):
(WebKit::RemoteRenderingBackendProxy::cacheFont):
(WebKit::RemoteRenderingBackendProxy::deleteAllFonts):
(WebKit::RemoteRenderingBackendProxy::releaseRemoteResource):
(WebKit::RemoteRenderingBackendProxy::sendWakeupMessage):
(WebKit::RemoteRenderingBackendProxy::createItemBuffer):

4:33 AM Changeset in webkit [274412] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

Simulated WebGL context screen change events should work with GPU process
https://bugs.webkit.org/show_bug.cgi?id=223121

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-15
Reviewed by Darin Adler.

Add a hunk missing from "WebGL context screen change events should work with GPU process"
that implements the context-specific event for simulating the context change.

Fixes

fast/canvas/webgl/webglcontextchangedevent.html

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::simulateEventForTesting):

4:27 AM Changeset in webkit [274411] by svillar@igalia.com
  • 6 edits in trunk

Do not shrink radio buttons bellow its size
https://bugs.webkit.org/show_bug.cgi?id=215575

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/radiobutton-min-size-expected.txt: Replaced FAIL by PASS expectations.

Source/WebCore:

A radio button used as a flex item would be invisible by default because it'll compute is
min-size to 0. That's why we should not let them shrink below their size (width/height).

  • platform/Theme.cpp:

(WebCore::Theme::minimumControlSize const): Do not let Radio buttons shrink bellow their size.

  • platform/Theme.h: make minimumControlSize() protected. Add a new non-virtual method with the same parameter

plus another one (the minimum size under which we cannot shrink) which calls the virtual method.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle): Pass the {style.width(),style.height()} as the minimum size under which
we should not shrink the control.

4:15 AM Changeset in webkit [274410] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r270185) [GTK] Some webgl failures after multivalue setter refactor
https://bugs.webkit.org/show_bug.cgi?id=219340

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-15
Reviewed by Simon Fraser.

Construct the simulated vertex attrib 0 buffer GCGLSpan with correct size -- the
pointer is GCGLfloat, so the length should be the count of floats.

No new tests, tested by the regressed tests:
fast/canvas/webgl/gl-bind-attrib-location-test.html
fast/canvas/webgl/gl-bind-attrib-mapped-names.html
webgl/1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html
webgl/1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html
webgl/1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html
webgl/1.0.3/conformance/programs/gl-bind-attrib-location-test.html
webgl/1.0.3/conformance/rendering/draw-elements-out-of-bounds.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):

12:36 AM Changeset in webkit [274409] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Improve coding style of CSSPropertyAnimation.cpp
https://bugs.webkit.org/show_bug.cgi?id=223148

Reviewed by Darin Adler.

As much as possible, do the following:

  1. mark classes as final
  2. mark overridden methods as final
  3. move overridden methods in private sections
  4. failing that, move them to protected sections
  5. stay clear from abbreviated terms
    • prop => property
    • anim => client
    • dst => destination
  6. use from/to as parameter names instead of a/b for any method where the role of the parameters warrant it (eg. blend, canInterpolate)

This should greatly improve the coding style used throughout CSSPropertyAnimation.cpp
and make it cohesive.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::blendFilterOperations):
(WebCore::blendFilter):
(WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
(WebCore::AnimationPropertyWrapperBase::property const):
(WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
(WebCore::PropertyWrapperGetter::value const):
(WebCore::PropertyWrapper::PropertyWrapper):
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
(WebCore::canInterpolateLengths):
(WebCore::canInterpolateLengthVariants):
(WebCore::NonNegativeFloatPropertyWrapper::NonNegativeFloatPropertyWrapper):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::isPropertyAnimatable):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):
(WebCore::DiscretePropertyWrapper::DiscretePropertyWrapper): Deleted.
(WebCore::LengthPropertyWrapper::LengthPropertyWrapper): Deleted.
(WebCore::LengthVariantPropertyWrapper::LengthVariantPropertyWrapper): Deleted.
(WebCore::LengthBoxPropertyWrapper::LengthBoxPropertyWrapper): Deleted.
(WebCore::PropertyWrapperClipPath::PropertyWrapperClipPath): Deleted.
(WebCore::PropertyWrapperFontVariationSettings::PropertyWrapperFontVariationSettings): Deleted.
(WebCore::PropertyWrapperShape::PropertyWrapperShape): Deleted.
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper): Deleted.
(WebCore::AcceleratedPropertyWrapper::AcceleratedPropertyWrapper): Deleted.
(WebCore::PropertyWrapperFilter::PropertyWrapperFilter): Deleted.
(WebCore::PropertyWrapperShadow::PropertyWrapperShadow): Deleted.
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists const): Deleted.
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists const): Deleted.
(WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): Deleted.
(WebCore::PropertyWrapperMaybeInvalidColor::value const): Deleted.
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): Deleted.
(WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper): Deleted.
(WebCore::FillLayerPositionPropertyWrapper::FillLayerPositionPropertyWrapper): Deleted.
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper): Deleted.
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): Deleted.
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Deleted.
(WebCore::ShorthandPropertyWrapper:: const): Deleted.
(WebCore::PropertyWrapperFlex::PropertyWrapperFlex): Deleted.
(WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): Deleted.
(WebCore::PropertyWrapperFontStyle::PropertyWrapperFontStyle): Deleted.
(WebCore::AutoPropertyWrapper::AutoPropertyWrapper): Deleted.
(WebCore::PerspectiveWrapper::PerspectiveWrapper): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::singleton): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::size): Deleted.
(WebCore::CSSPropertyAnimationWrapperMap::indexFromPropertyID): Deleted.

Mar 14, 2021:

11:20 PM Changeset in webkit [274408] by weinig@apple.com
  • 9 edits in trunk

Match other browsers by interpolating colors in floating point space rather than uint8_t space
https://bugs.webkit.org/show_bug.cgi?id=223165

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/outline-017-expected.txt:

Update color interpolation results.

Source/WebCore:

  • platform/graphics/ColorBlending.cpp:

(WebCore::blend):
(WebCore::blendWithoutPremultiply):
Rather than blending the components as uint8_t channels, match other browsers by blending
them as float channels. I have not yet determined if a spec says this, but matching other
browsers makes sense and fixes a bunch of WPT results. I will follow up with the CSS WG to
determine where/if this is/should be specified.

  • platform/graphics/ColorUtilities.cpp:

(WebCore::unpremultiplied):
Avoid division by zero.

5:57 PM Changeset in webkit [274407] by Fujii Hironori
  • 6 edits in trunk

[Win][WK1] Add a new API IWebPreferences::startBatchingUpdates to defer WebPreferencesChangedNotification
https://bugs.webkit.org/show_bug.cgi?id=223109

Reviewed by Sam Weinig.

Source/WebKitLegacy/win:

Some JS tests are timing out for Windows WebKit1 Debug build since
r274111. Those tests generate very large pages. r274111 resets
WebPreferences to the initial state. Changing a preference causes
relayout. Thus, resetting preferences caused layouts repeatedly.

r274040 (Bug 218024) added _batchUpdatePreferencesInBlock to
WebPreferences for Mac WebKit1 to defer the notification.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferences.cpp:

(WebPreferences::postPreferencesChangesNotification):
(WebPreferences::startBatchingUpdates): Added.
(WebPreferences::stopBatchingUpdates): Added.

  • WebPreferences.h:

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebViewToConsistentStateBeforeTesting):

3:18 PM Changeset in webkit [274406] by Alexey Shvayka
  • 4 edits in trunk/Source/JavaScriptCore

REGRESSION (r274308): Two assertions in JSGlobalObject::defineOwnProperty() are failing
https://bugs.webkit.org/show_bug.cgi?id=223134

Reviewed by Yusuke Suzuki.

This patch:

  1. Simplifies exception check after validateAndApplyPropertyDescriptor() as it conditionally throws on failure.
  2. Creates new SymbolTableEntry when global variable is redefined as read-only because setAttributes() performs pack(), which doesn't support fat entries.

Due to #2, symbolTableGet() overload is simplified to return fast entry, and
setAttributes() is removed as unused.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::defineOwnProperty):

  • runtime/JSSymbolTableObject.h:

(JSC::symbolTableGet):

  • runtime/SymbolTable.h:

(JSC::SymbolTableEntry::getAttributes const):
(JSC::SymbolTableEntry::setAttributes): Deleted.

3:12 PM Changeset in webkit [274405] by ysuzuki@apple.com
  • 3 edits
    1 move
    1 add in trunk/JSTests

[JSC] Run one Mozilla test explicitly under PST since this test does not work when we are moving from PST to PDT
https://bugs.webkit.org/show_bug.cgi?id=223158

Reviewed by Mark Lam.

This mozilla test is broken: it fails when we are close to the point moving from PST to PDT / from PDT to PST.
We should always run this test under PST to avoid this DST related flakiness.

We explicitly set TZ=PST for this test to ensure that this runs under PST (not PDT). TZ environment variable is
recognized by system frameworks and some libraries including tzdata and ICU.

  • complex.yaml:
  • complex/mozilla-ecma-Date-15.9.5.14.js: Renamed from JSTests/mozilla/ecma/Date/15.9.5.14.js.

(test):

  • complex/mozilla-shell.js: Added.

(AddTestCase):
(TestCase):
(startTest):
(test):
(getTestCaseResult):
(writeTestCaseResult):
(writeFormattedResult):
(writeLineToLog):
(writeHeaderToLog):
(stopTest):
(getFailedCases):
(getTimeZoneDiff):
(adjustResultArray):
(Day):
(DaysInYear):
(TimeInYear):
(DayNumber):
(TimeWithinDay):
(YearNumber):
(TimeFromYear):
(DayFromYear):
(InLeapYear):
(YearFromTime):
(MonthFromTime):
(DayWithinYear):
(DateFromTime):
(WeekDay):
(UTC):
(DaylightSavingTA):
(GetFirstSundayInApril):
(GetLastSundayInOctober):
(GetSecondSundayInMarch):
(GetFirstSundayInNovember):
(LocalTime):
(MakeTime):
(MakeDay):
(TimeInMonth):
(TimeClip):
(ToInteger):
(Enumerate):
(GetContext):
(OptLevel):

  • mozilla/mozilla-tests.yaml:
2:19 PM Changeset in webkit [274404] by ysuzuki@apple.com
  • 5 edits
    3 adds in trunk

Prevent dynamic import in service worker
https://bugs.webkit.org/show_bug.cgi?id=222308

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Covering service-worker case.

  • web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt:

Source/WebCore:

dynamic-import should be always rejected if script is executed in Worklets or ServiceWorkers.
This is recently changed in the spec https://github.com/whatwg/html/pull/6395.

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::isWorkletOrServiceWorker):
(WebCore::ScriptModuleLoader::importModule):

LayoutTests:

Covering worklet case.

  • http/wpt/webaudio/the-audio-api/the-audioworklet-interface/dynamic-import-is-prohibited.https-expected.txt: Added.
  • http/wpt/webaudio/the-audio-api/the-audioworklet-interface/dynamic-import-is-prohibited.https.html: Added.
  • http/wpt/webaudio/the-audio-api/the-audioworklet-interface/processors/dynamic-import-is-prohibited.js: Added.

(DynamicImportIsProhibitedProcessor.prototype.process):
(DynamicImportIsProhibitedProcessor):

1:47 PM Changeset in webkit [274403] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Cancel image loader events after first dispatch
https://bugs.webkit.org/show_bug.cgi?id=218556

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

Address post review comments.

  • dom/EventSender.h:

(WebCore::EventSender<T>::dispatchPendingEvents):

1:26 PM Changeset in webkit [274402] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[Big Sur arm64] testb3 crashing
https://bugs.webkit.org/show_bug.cgi?id=222815

Reviewed by Mark Lam.

Fix dmb ish and dmb ishst's formats.

  • b3/testb3_6.cpp:

(testMemoryFence):
(testStoreFence):
(testLoadFence):

1:22 PM Changeset in webkit [274401] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] ARM64 branchAtomicWeakCAS should not use sign-extension
https://bugs.webkit.org/show_bug.cgi?id=222813

Reviewed by Mark Lam.

ARM64 branchAtomicWeakCAS implementation should not use sign-extension. Instead, it should use zero-extension.
This is because loadLinkAcq (ldaxr) will load a value with zero-extension. If we use sign-extension, we will
encounter the state where LL/SC never succeeds just because we are comparing sign-extended value and zero-extended
value. This implementation is aligned to how X86 implementation works: X86 only cares the effective bit width of branchAtomicWeakCAS.

This is already tested by stress/atomics-store-result-int52.js.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::zeroExtend):
(JSC::MacroAssemblerARM64::atomicStrongCAS):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS):
(JSC::MacroAssemblerARM64::signExtend): Deleted.
(JSC::MacroAssemblerARM64::signExtend<8>): Deleted.
(JSC::MacroAssemblerARM64::signExtend<16>): Deleted.

11:46 AM Changeset in webkit [274400] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

GCSegmentedArray's size() and isEmpty() methods should be const.
https://bugs.webkit.org/show_bug.cgi?id=223156

Reviewed by Keith Miller.

  • heap/GCSegmentedArray.h:
  • heap/GCSegmentedArrayInlines.h:

(JSC::GCSegmentedArray<T>::isEmpty const):
(JSC::GCSegmentedArray<T>::size const):
(JSC::GCSegmentedArray<T>::isEmpty): Deleted.
(JSC::GCSegmentedArray<T>::size): Deleted.

11:19 AM Changeset in webkit [274399] by ysuzuki@apple.com
  • 4 edits
    2 adds in trunk

[JSC] wasm atomic wait offset is not index
https://bugs.webkit.org/show_bug.cgi?id=223159

Reviewed by Mark Lam.

JSTests:

  • wasm.yaml:
  • wasm/threads-spec-tests/resources/wait-large.wast: Added.
  • wasm/threads-spec-tests/wait-large.wast.js: Added.

Source/JavaScriptCore:

While JS Atomics.wait's argument is "index" in the typed-array, argument of wasm wait and notify is address.
But we are handling it as an index incorrectly.
This patch uses it as an address.

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

7:46 AM Changeset in webkit [274398] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderLineBreak should stay inline level box even when display property says otherwise.
https://bugs.webkit.org/show_bug.cgi?id=223151
<rdar://74339837>

Reviewed by Antti Koivisto.

In this patch we make sure that the RenderLineBreak object always stays inline.

While the display property applies to all elements (https://drafts.csswg.org/css-display/#the-display-properties), the line
break element (<br>) seems to be an exception and all browsers handle <br style="display: block"> still as an inline level element.

Renderers can (and do see RenderSVGInline::updateFromStyle) diverge from this computed display value and say they always want to
be inline level boxes. This is ensured by RenderObject::setInline/isInline function pair.

Initially there were 2 setInline() calls:
One in RenderObject::setStyle(). It dealt with "block to inline" transition and
one call in RenderBox::setStyle().
In these functions we simply set the renderer's "inInline" bit to the computed style value (setInline(style.isDisplayInlineType)).
However derived renderer classes were able to override it by implementing the ::setStyle function and
explicitly set the "isInline" bit to true/false.

Over the years the second (RenderBox::setStyle) call transitioned to RenderBoxModelObject::updateFromStyle()
and the first (RenderObject::setStyle) call got moved to normalizeTreeAfterStyleChange() and their order got flipped.

Derived renderer classes can still explicitly set the "isInline" bit by implementing the ::updateFromStyle() function
(this is similar to what we had with ::setStyle).
However since the order is flipped, the "setInline()" call in normalizeTreeAfterStyleChange() now runs after
updateFromStyle() and it may re-reset the "isInline" bit back to the computed value (hence the FIXME).

The "setInline" call in normalizeTreeAfterStyleChange() is not needed anymore since the "isInline" bit is already updated by
the time we get here (as opposed to when it was initially introduced in RenderObject::setStyle, see above).

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::updateFromStyle):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):

1:16 AM Changeset in webkit [274397] by Lauro Moura
  • 3 edits in trunk

[GLIB] Keep GPUProcess disabled when using experimental features
https://bugs.webkit.org/show_bug.cgi?id=223155

Reviewed by Philippe Normand.

At least two recent GPUProcess-related revisions caused issues in
GLIB, causing serious regressions in the bots. Disabling it for now
until we improve its support.

Revisions:

r274327 - 2D Canvas enabled by default in GPUProcess
r272842 - Media enabled by default in GPUProcess

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

Mar 13, 2021:

10:51 PM Changeset in webkit [274396] by Wenson Hsieh
  • 3 edits
    3 adds in trunk

[iOS] Selecting the first word in an image overlay may select text in the previous line
https://bugs.webkit.org/show_bug.cgi?id=223153

Reviewed by Tim Horton.

Source/WebCore:

Add a (collapsible) newline at the start of each line of text in an image overlay, so that
wordRangeFromPosition will not include content from the previous line when selecting the first word in a
line inside an image overlay.

Test: fast/images/image-extraction/ios/select-word-in-image-overlay.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

LayoutTests:

Add a layout test to verify the behavior change.

  • fast/images/image-extraction/ios/select-word-in-image-overlay-expected.txt: Added.
  • fast/images/image-extraction/ios/select-word-in-image-overlay.html: Added.
7:32 PM Changeset in webkit [274395] by Wenson Hsieh
  • 8 edits
    3 adds in trunk

Add support for accessibility image overlays in layout tests
https://bugs.webkit.org/show_bug.cgi?id=223146

Reviewed by Tim Horton.

Source/WebCore:

Introduce an internal testing hook to install image overlay content, for layout and API tests.

Test: fast/images/image-extraction/basic-image-overlay.html

  • dom/DOMPointReadOnly.h:
  • dom/DOMPointReadOnly.idl:

Additionally add WebCore export macros to DOMPointReadOnly, so that Internals code can this class.

  • testing/Internals.cpp:

(WebCore::Internals::installImageOverlay):

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

LayoutTests:

Add a very basic test to ensure that image overlay content can be installed.

  • TestExpectations:
  • fast/images/image-extraction/basic-image-overlay-expected-mismatch.html: Added.
  • fast/images/image-extraction/basic-image-overlay.html: Added.
7:22 PM Changeset in webkit [274394] by Sam Sneddon
  • 3 edits in trunk/Tools

Move LayoutTestFinder.split_into_chunks to Manager._split_into_chunks
https://bugs.webkit.org/show_bug.cgi?id=223137

Reviewed by Jonathan Bedard.

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

(LayoutTestFinder.split_into_chunks):

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

(Manager._split_into_chunks):
(Manager._prepare_lists):

6:47 PM Changeset in webkit [274393] by commit-queue@webkit.org
  • 21 edits
    7 deletes in trunk

Unreviewed, reverting r274379.
https://bugs.webkit.org/show_bug.cgi?id=223154

Some LayoutTests are crashing

Reverted changeset:

"Cache cross-origin methods / accessors of Window and Location
per lexical global object"
https://bugs.webkit.org/show_bug.cgi?id=222739
https://trac.webkit.org/changeset/274379

1:55 PM Changeset in webkit [274392] by Chris Gambrell
  • 3 edits in trunk/LayoutTests

[ macOS Wk2 ] http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.php is constantly text failing
https://bugs.webkit.org/show_bug.cgi?id=223079
<rdar://problem/75323779>

Reviewed by Jonathan Bedard.

  • http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.php:
12:00 PM Changeset in webkit [274391] by graouts@webkit.org
  • 6 edits
    3 adds in trunk

Fix interpolation of clip CSS property
https://bugs.webkit.org/show_bug.cgi?id=223126

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Import interpolation tests for clip. These tests pass completely
with 42 PASS results compared to prior to the source changes.

  • web-platform-tests/css/css-masking/animations/clip-interpolation-expected.txt: Added.
  • web-platform-tests/css/css-masking/animations/clip-interpolation.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-masking/animations/clip-interpolation.html

While we already had support for interpolating the clip property, we had a couple of small
issues to fix to pass the entire WPT test dedicated to testing that feature:

  1. we must allow negative values
  2. we must serialize the value to "auto" if all four values are "auto"
  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

LayoutTests:

Rebase a test that used the old, incorrect computed value for "clip" with
four "auto" values.

  • fast/css/computed-clip-with-auto-rect-expected.txt:
11:08 AM Changeset in webkit [274390] by Peng Liu
  • 15 edits in trunk

[GPUP][MSE] MediaSource::buffered and MediaSource::activeSourceBuffers do not update in the same run loop as MediaSource::endOfStream()
https://bugs.webkit.org/show_bug.cgi?id=221293

Reviewed by Jer Noble.

Source/WebCore:

Currently, both SourceBuffer and SourceBufferPrivate own an m_buffered
and we need to synchronize them with a callback. When we run SourceBufferPrivate
in the GPU process, the synchronization might be delayed, e.g., function
SourceBuffer::readyStateChanged() will trigger an update to m_buffered
but its new value won't be available for the Web process in the same
run loop.

To fix this issue, this patch removes SourceBuffer::m_buffered as well
the callback to synchronize it. When we run SourceBufferPrivate in the GPU
process, SourceBufferPrivateRemote synchronizes its m_buffered with
SourceBufferPrivate through a synchronous IPC message.

No new tests. Fix a test failure:

  • imported/w3c/web-platform-tests/media-source/mediasource-buffered.html
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::buffered const):
(WebCore::SourceBuffer::sourceBufferPrivateBufferedRangesChanged): Deleted.

  • Modules/mediasource/SourceBuffer.h:
  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::setBufferedRanges):
(WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::buffered const):

  • platform/graphics/SourceBufferPrivateClient.h:

Source/WebKit:

When a Web process needs to "pull" the latest value of m_buffered from the
GPU process (updateBufferedFromTrackBuffers), we need to use a synchronous
IPC message.

When the GPU process needs to "push" the latest value of m_buffered to
a Web process, we can use an asynchronous message, e.g, RemoveCodedFrames
and SourceBufferPrivateAppendComplete.

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:

(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete):
(WebKit::RemoteSourceBufferProxy::updateBufferedFromTrackBuffers):
(WebKit::RemoteSourceBufferProxy::removeCodedFrames):
(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateBufferedRangesChanged): Deleted.

  • GPUProcess/media/RemoteSourceBufferProxy.h:
  • GPUProcess/media/RemoteSourceBufferProxy.messages.in:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::updateBufferedFromTrackBuffers):
(WebKit::SourceBufferPrivateRemote::removeCodedFrames):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateBufferedRangesChanged): Deleted.

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in:

LayoutTests:

  • platform/mac/TestExpectations:
8:26 AM Changeset in webkit [274389] by commit-queue@webkit.org
  • 10 edits in trunk/LayoutTests

[css-flexbox] Fix incorrect relative path
https://bugs.webkit.org/show_bug.cgi?id=223120

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

LayoutTests/imported/w3c:

Fix incorrect relative path, because of this the comparisons
were not accurate, causing failures where the rendering was correct.

  • web-platform-tests/css/css-flexbox/align-baseline-expected.html:
  • web-platform-tests/css/css-flexbox/align-content_flex-start-expected.html:
  • web-platform-tests/css/css-flexbox/align-content_space-between-expected.html:
  • web-platform-tests/css/css-flexbox/align-self-015-expected.html:
  • web-platform-tests/css/css-flexbox/auto-margins-003-expected.html:
  • web-platform-tests/css/css-flexbox/flex-item-vertical-align-expected.html:
  • web-platform-tests/css/css-flexbox/stretch-input-in-column-expected.html:

LayoutTests:

Enable tests that pass now.

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

[build.webkit.org] run buildbot checkconfig in services ews
https://bugs.webkit.org/show_bug.cgi?id=222687

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunBuildbotCheckConfigForEWS): Renamed from RunEWSBuildbotCheckConfig.
(RunBuildbotCheckConfigForBuildWebKit): Build step to run buildbot checkconfig for build.webkit.org

  • CISupport/ews-build/factories.py:

(ServicesFactory.init): Added build step to run buildbot checkconfig for build.webkit.org

  • CISupport/ews-build/steps_unittest.py: Added and updated unit-tests.
  • CISupport/ews-build/factories_unittest.py: Updated unit-tests.
8:09 AM Changeset in webkit [274387] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Mark the line dirty when list marker goes from inline to block
https://bugs.webkit.org/show_bug.cgi?id=223132

Reviewed by Antti Koivisto.

This patch ensures that the line layout has a chance to clean up the inline boxes when the marker goes from inline to block.
Instead of deleting the inline box wrapper (InlineElement) here let's

  1. mark both the renderer and the line dirty and let the inline layout code run its normal cleanup process on dirty lines.
  2. detach the inline box wrapper from the now-block list marker.
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::styleDidChange):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::verticalPositionForBox):

7:06 AM Changeset in webkit [274386] by Philippe Normand
  • 6 edits in trunk/Source

Unreviewed, fix build warnings after r273204 and r274323

Source/WebCore:

  • storage/StorageQuotaManager.cpp:

(WebCore::StorageQuotaManager::tryGrantRequest): Use portable uint64_t format specifier.

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::storageQuotaManager): Use portable uint64_t format specifier.

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::StreamConnectionWorkQueue):

  • Platform/IPC/StreamConnectionWorkQueue.h: Make m_name COCOA specific to avoid

unused-member on other platforms.

6:27 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
3:11 AM Changeset in webkit [274385] by youenn@apple.com
  • 33 edits
    2 moves
    1 add
    2 deletes in trunk

Update RTCRtpScriptTransform to the latest version of the spec
https://bugs.webkit.org/show_bug.cgi?id=222982

Reviewed by Eric Carlson.

Source/WebCore:

Move from AudioWorklet model to an event based model as per latest specification.
RTCRtpScriptTransformer concentrates all the API and is exposed to worker using a new rtctransform event.
Add support for options parameter provided in RTCRtpScriptTransform constructor.

Covered by existing tests.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/mediastream/RTCRtpScriptTransform.cpp:

(WebCore::RTCRtpScriptTransform::create):
(WebCore::RTCRtpScriptTransform::setTransformer):

  • Modules/mediastream/RTCRtpScriptTransform.h:
  • Modules/mediastream/RTCRtpScriptTransform.idl:
  • Modules/mediastream/RTCRtpScriptTransformProvider.idl:
  • Modules/mediastream/RTCRtpScriptTransformer.cpp:

(WebCore::RTCRtpScriptTransformer::create):
(WebCore::RTCRtpScriptTransformer::RTCRtpScriptTransformer):
(WebCore::RTCRtpScriptTransformer::readable):
(WebCore::RTCRtpScriptTransformer::writable):
(WebCore::RTCRtpScriptTransformer::start):
(WebCore::RTCRtpScriptTransformer::requestKeyFrame):
(WebCore::RTCRtpScriptTransformer::options):

  • Modules/mediastream/RTCRtpScriptTransformer.h:

(WebCore::RTCRtpScriptTransformer::startPendingActivity):

  • Modules/mediastream/RTCRtpScriptTransformer.idl:
  • Modules/mediastream/RTCRtpScriptTransformerConstructor.h: Removed.
  • Modules/mediastream/RTCRtpScriptTransformerConstructor.idl: Removed.
  • Modules/mediastream/RTCRtpScriptTransformerContext.h: Removed.
  • Modules/mediastream/RTCRtpScriptTransformerContext.idl: Removed.
  • Modules/mediastream/RTCTransformEvent.cpp: Added.
  • Modules/mediastream/RTCTransformEvent.h: Added.
  • Modules/mediastream/RTCTransformEvent.idl: Added.
  • Modules/model-element/HTMLModelElement.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/ReadableStream.h:

(WebCore::toJS):

  • bindings/js/WebCoreBuiltinNames.h:
  • bindings/js/WritableStream.h:

(WebCore::toJS):

  • dom/EventNames.h:
  • dom/EventNames.in:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::prepareForDestruction):
(WebCore::DedicatedWorkerGlobalScope::createRTCRtpScriptTransformer):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/Worker.cpp:

(WebCore::Worker::createRTCRtpScriptTransformer):

  • workers/Worker.h:

LayoutTests:

  • http/wpt/webrtc/audio-script-transform.html:
  • http/wpt/webrtc/context-transform.js:

(MockRTCRtpTransformer):
(MockRTCRtpTransformer.prototype.start):
(MockRTCRtpTransformer.prototype.process):
(onrtctransform):

  • http/wpt/webrtc/no-transform.js:
  • http/wpt/webrtc/no-webrtc-transform-expected.txt:
  • http/wpt/webrtc/no-webrtc-transform.html:
  • http/wpt/webrtc/script-transform.js:

(onrtctransform.process):
(onrtctransform):

  • http/wpt/webrtc/sframe-transform.js:

(onrtctransform):

  • http/wpt/webrtc/video-script-transform.html:
3:03 AM Changeset in webkit [274384] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

Unreviewed. Merge the changes to the perspective interpolation test that resulted
from https://github.com/web-platform-tests/wpt/pull/28036 and update the expectations
now that we pass this test entirely with 16 new PASS results.

  • web-platform-tests/css/css-transforms/animation/perspective-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/perspective-interpolation.html:
2:57 AM Changeset in webkit [274383] by graouts@webkit.org
  • 3 edits
    6 adds in trunk

Fix interpolation of orphans and widows CSS properties
https://bugs.webkit.org/show_bug.cgi?id=223124

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import interpolation tests for orphans and widows. These tests pass completely
weith 44 PASS results compared to prior to the source changes.

  • web-platform-tests/css/css-break/animation/orphans-interpolation-expected.txt: Added.
  • web-platform-tests/css/css-break/animation/orphans-interpolation.html: Added.
  • web-platform-tests/css/css-break/animation/widows-interpolation-expected.txt: Added.
  • web-platform-tests/css/css-break/animation/widows-interpolation.html: Added.

Source/WebCore:

The orphans and widows properties must be positive integers, so we add a dedicated
wrapper for these properties.

Tests: imported/w3c/web-platform-tests/css/css-break/animation/orphans-interpolation.html

imported/w3c/web-platform-tests/css/css-break/animation/widows-interpolation.html

  • animation/CSSPropertyAnimation.cpp:

(WebCore::PositivePropertyWrapper::PositivePropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

1:36 AM Changeset in webkit [274382] by Fujii Hironori
  • 4 edits in trunk/Source/WebCore

Non-unified builds can't compile JSWebGLRenderingContext.cpp: error: member access into incomplete type 'WebCore::WebGLSampler'
https://bugs.webkit.org/show_bug.cgi?id=223142

Reviewed by Youenn Fablet.

  • html/canvas/WebGLRenderingContextBase.h: Added some missing header inclusions.
  • html/canvas/WebGLTransformFeedback.cpp:
  • html/canvas/WebGLTransformFeedback.h: Fixed a recursive header inclusion with WebGL2RenderingContext.h.
1:31 AM Changeset in webkit [274381] by Martin Robinson
  • 8 edits
    2 adds in trunk

Add basic (non-momentum) wheel event handling for scroll snap
https://bugs.webkit.org/show_bug.cgi?id=222594
Source/WebCore:

Reviewed by Simon Fraser.

Test: css3/scroll-snap/scroll-snap-wheel-event.html

Enable scroll snapping for basic wheel events on GTK+ and WPE. The Mac port
has special wheel handling due to momentum scrolling. Other scroll-snap-enabled
ports can just use a basic version.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scroll): Accept a bitmask of options now. This
will allow using this method when handling wheel events that do not animate.
(WebCore::ScrollAnimator::handleWheelEvent): Trigger ::scroll with
scroll snapping enabled and pass the appropriate option to disable animations.
(WebCore::ScrollAnimator::processWheelEventForScrollSnap): Deleted.

  • platform/ScrollAnimator.h:

(WebCore::ScrollAnimator::ScrollAnimator::processWheelEventForScrollSnap): Made
this a method that can be overridden by subclasses.

  • platform/mac/ScrollAnimatorMac.h: Added processWheelEventForScrollSnap.
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::scroll): Pay attention to the NeverAnimate bitmask now.
(WebCore::ScrollAnimatorMac::processWheelEventForScrollSnap): Added.

LayoutTests:

Reviewed by Simon Fraser.

  • css3/scroll-snap/scroll-snap-wheel-event-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-wheel-event.html: Added.
  • platform/ios-wk2/TestExpectations: Skip new test because it uses mouse event simulation.

Move existing classification to better section as well.

  • platform/mac-wk1/fast/scrolling/latching/scroll-snap-latching-expected.txt: Rebased this previous failing test.
1:03 AM Changeset in webkit [274380] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Adopt DDMacAction instead of DDAction on macOS
https://bugs.webkit.org/show_bug.cgi?id=223145
<rdar://problem/70127512>

Reviewed by Megan Gardner.

Source/WebCore/PAL:

  • pal/spi/mac/DataDetectorsSPI.h:

Source/WebKit:

  • Platform/mac/MenuUtilities.mm:

(WebKit::actionForMenuItem):
(WebKit::menuItemForTelephoneNumber):
(WebKit::menuForTelephoneNumber):
Adopt the new class name, when available.

Source/WTF:

  • wtf/PlatformHave.h:
1:02 AM Changeset in webkit [274379] by Alexey Shvayka
  • 21 edits
    7 adds in trunk

Cache cross-origin methods / accessors of Window and Location per lexical global object
https://bugs.webkit.org/show_bug.cgi?id=222739

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-caching-expected.txt: Added.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-caching.html: Added.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-common.js: Added.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-length-expected.txt: Added.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-length.html: Added.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-name-expected.txt: Added.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-name.html: Added.

Source/JavaScriptCore:

  1. Add WeakGCMap::ensure() to avoid double hashing and clean up JSObject::getOwnPropertyDescriptor().
  2. Assert early that JSCustom{Getter,Setter}Function is created with non-null function pointer.
  3. Rename getCustom{Getter,Setter}Function() to align with newly-added JSDOMGlobalObject methods.
  • runtime/JSCustomGetterFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSCustomGetterFunction::create):

  • runtime/JSCustomSetterFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSCustomSetterFunction::create):

  • runtime/JSObject.cpp:

(JSC::createCustomGetterFunction):
(JSC::createCustomSetterFunction):
(JSC::JSObject::getOwnPropertyDescriptor):
(JSC::getCustomGetterFunction): Deleted.
(JSC::getCustomSetterFunction): Deleted.

  • runtime/Lookup.h:

(JSC::nonCachingStaticFunctionGetterImpl): Deleted.

  • runtime/WeakGCMap.h:

Source/WebCore:

For cross-origin methods / accessors, Window and Location objects return different JSFunction
instances on every Get?. The intent was to ensure isolation by supplying different Realms with
different function objects. However, within the same callee Realm, this makes subsequent lookups
of a cross-origin method / accessor fail reference equality test, which is rather confusing:

crossOriginWindow.focus === crossOriginWindow.focus // => false

This patch implements CrossOriginPropertyDescriptorMap?, bringing consistent function identity
and aligning WebKit with the spec [1], Blink, and Gecko. For convenience, cache maps are added to
JSDOMGlobalObject (to accommodate RemoteDOMWindow) and cover both Window and Location objects.

As a cache map key, a pair of lexical global object and raw function pointer is used, which guarantees
correctness even if Window and Location would expose cross-origin property of the same name.

This patch removes 9 custom getters, adds runtime lookup for "showModalDialog" (which is rare),
and removes [ForwardDeclareInHeader] extended attribute as it's now unused and non-trivial to generate.

Also, fixes cross-realm postMessage.length to equal 1 as per WebIDL.

[1] https://html.spec.whatwg.org/multipage/browsers.html#crossorigingetownpropertyhelper-(-o,-p-)

Tests: imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-caching.html

imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-length.html
imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-function-name.html

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
(WebCore::JSDOMGlobalObject::createCrossOriginFunction):
(WebCore::JSDOMGlobalObject::createCrossOriginGetterSetter):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
(WebCore::JSDOMWindow::getOwnPropertySlot):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::getOwnPropertySlotCommon):
(WebCore::JSC_DEFINE_CUSTOM_GETTER): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/scripts/IDLAttributes.json:
  • page/DOMWindow.idl:
  • page/History.idl:
  • page/Location.idl:
  • page/RemoteDOMWindow.idl:

LayoutTests:

  • http/tests/navigation/process-swap-window-open-expected.txt:
  • http/tests/navigation/process-swap-window-open.html:

Mar 12, 2021:

6:29 PM Changeset in webkit [274378] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[Cocoa][WebM] Hang when reloading page before WebM content is loaded
https://bugs.webkit.org/show_bug.cgi?id=223139
<rdar://75351029>

Reviewed by Darin Adler.

No new tests; a truly deterministic test would require a .cgi script to block loading after
the WebM init segment, but a bug in the platform format reader causes URLs not ending in
.webm to fail to load the format reader plugin. Once this issue is fixed, we can write a
test to cover this behavior.

The WebM TrackEntry "enabled" bit is optional, and WebKit previously waited until any media data
was appended to say whether or not the track is enabled in the absense of an explicit signal.
Instead, assume any track that is not explicity disabled is enabled, for the purpose of the
format reader. This means that "enabled" queries will no longer block, which breaks the deadlock
when tearing down the AVAsset backing the WebM file.

  • Shared/mac/MediaFormatReader/MediaTrackReader.cpp:

(WebKit::MediaTrackReader::copyProperty):

6:26 PM Changeset in webkit [274377] by Chris Fleizach
  • 3 edits in trunk/Source/WebKit

AX: PDF frame conversion routines need to be updated
https://bugs.webkit.org/show_bug.cgi?id=223138

Reviewed by Darin Adler.

PDF bounding boxes are wrong in WebKit because.

1) There's no way for PDF objects to get the primary screen height. So we need to be able to return the primary

screen height from an object in the PDF hierarchy.

2) The WKPDFPluginAccessibilityObject's position was not being converted correctly.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
(-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(WebKit::PDFPlugin::boundsOnScreen const):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):

6:01 PM Changeset in webkit [274376] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

Add more MediaStream logging
https://bugs.webkit.org/show_bug.cgi?id=223143
<rdar://problem/75380363>

Reviewed by Jer Noble.

No new tests, no functional change.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::clone):
(WebCore::MediaStreamTrack::stopTrack):
(WebCore::MediaStreamTrack::trackStarted):
(WebCore::MediaStreamTrack::trackEnded):

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::setEnabled):
(WebCore::MediaStreamTrackPrivate::endTrack):
(WebCore::MediaStreamTrackPrivate::clone):
(WebCore::MediaStreamTrackPrivate::createAudioSourceProvider):
(WebCore::MediaStreamTrackPrivate::sourceStarted):
(WebCore::MediaStreamTrackPrivate::sourceStopped):
(WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
(WebCore::MediaStreamTrackPrivate::sourceSettingsChanged):
(WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
(WebCore::MediaStreamTrackPrivate::hasStartedProducingData):
(WebCore::MediaStreamTrackPrivate::updateReadyState):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setMuted):
(WebCore::RealtimeMediaSource::requestToEnd):
(WebCore::RealtimeMediaSource::end):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::startProducingData):
(WebCore::AVVideoCaptureSource::stopProducingData):
(WebCore::AVVideoCaptureSource::shutdownCaptureSession):
(WebCore::AVVideoCaptureSource::orientationChanged):

5:55 PM Changeset in webkit [274375] by commit-queue@webkit.org
  • 6 edits in trunk

REGRESSION(r274270): [WPE][GTK] Broke Epiphany test /embed/ephy-web-view/error-pages-not-stored-in-history
https://bugs.webkit.org/show_bug.cgi?id=223140

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-12
Reviewed by Alex Christensen.

Source/WebCore:

If the SecurityOriginData has no protocol or host, return an empty string instead of ":"

  • page/SecurityOriginData.cpp:

(WebCore::SecurityOriginData::toString const):

Source/WebKit:

Convert empty strings to NULL.

  • UIProcess/API/glib/WebKitSecurityOrigin.cpp:

(webkit_security_origin_to_string):

Tools:

Improve WebKitSecurityOrigin tests a bit.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:

(testCustomProtocolOrigin): Drive-by improvement: check webkit_security_origin_to_string().
(testBogusURI): Added, tests for this bug.
(beforeAll):

4:00 PM Changeset in webkit [274374] by mmaxfield@apple.com
  • 18 edits
    1 copy in trunk

[macOS] MobileAsset fonts are broken in Reader mode in Safari
https://bugs.webkit.org/show_bug.cgi?id=223062

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h:

Source/WebKit:

Here is an ASCII-art description of how various kinds of installed fonts work in WebKit:

+----------------------++-----------------------------------------+-----------------------------------------+

|
Safari | Normal WKWebViews |

+======================++=========================================+=========================================+

| Preinstalled Fonts
Just works | Just works |

+----------------------++-----------------------------------------+-----------------------------------------+

| MobileAsset Fonts | | | | | | | | | | | | | | | | | | |
Needs access to mobileassetd | Needs access to mobileassetd but not |
(and fontd for any subsequent requests | fontd. |
after the first MobileAsset font is | |
used) | App calls _grantAccessToAssetServices() |
| to vend the sandbox extension |
App calls _grantAccessToAssetServices() | |
to vend the sandbox extension to | And then the app needs to use |
mobileassetd | InjectedBundle to activate the fonts in |
| the web process |
Web process also needs a call to | |
CTFontManagerEnableAllUserFonts() and a | |
sandbox extension to access fontd | |
| |
After this call is made, font requests | |
go through fontd (like for normal | |
WKWebViews) | |
| |
And then the app needs to use | |
InjectedBundle to activate the fonts in | |
the web process | |

+----------------------++-----------------------------------------+-----------------------------------------+

| User-installed Fonts | | |
Intentionally doesn't work | Needs access to fontd. |
| |
| Just works (we already vend the sandbox |
| extension upon WKWebView creation) |

+----------------------++-----------------------------------------+-----------------------------------------+

The part that this patch fixes is the "Web process also needs a call to CTFontManagerEnableAllUserFonts()
and a sandbox extension to access fontd" under MobileAsset Fonts / Safari.

From looking at this chart, it becomes clear that a new message is necessary that does:

  1. Adds a sandbox extension so the web process can access fontd
  2. Calls CTFontManagerEnableAllUserFonts() to cause platform font routines to use fontd

So that's exactly what this patch does. It adds new WKWebView SPI,
_switchFromStaticFontRegistryToUserFontRegistry, which does these two things.

Even when we start using fontd, that doesn't allow user-installed fonts in WebKit in Safari, because we'll still
continue to use kCTFontUserInstalledAttribute / kCTFontFallbackOptionAttribute, just like we do in Big Sur.

Test: WebKit.MobileAssetSandboxCheck

  • UIProcess/API/C/WKPreferencesRefPrivate.h: Correct the comment.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _switchFromStaticFontRegistryToUserFontRegistry]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::switchFromStaticFontRegistryToUserFontRegistry):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):
(WebKit::customizedReaderConfiguration): Deleted.
(WebKit::disableStaticFontRegistry): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::~WebPage):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry):

  • WebProcess/glib/WebProcessGLib.cpp:

(WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry):

  • WebProcess/playstation/WebProcessPlayStation.cpp:

(WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry):

  • WebProcess/win/WebProcessWin.cpp:

(WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/FontRegistrySandboxCheck.mm: Copied from Source/WebKit/WebProcess/playstation/WebProcessPlayStation.cpp.

(TEST):

3:52 PM Changeset in webkit [274373] by Said Abou-Hallawa
  • 4 edits in trunk

[GPU Process] inspector/canvas/memory.html fails when GPU rendering is enabled for 2D Canvas
https://bugs.webkit.org/show_bug.cgi?id=222880

Reviewed by Tim Horton.

Source/WebCore:

RemoteImageBufferProxy has to ensure its backend is created in the GPUP
before reporting its memory cost.

  • platform/graphics/ConcreteImageBuffer.h:

LayoutTests:

Enable GPUP rendering for 2D canvas for this test.

  • inspector/canvas/memory.html:
3:14 PM Changeset in webkit [274372] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.31.91

WPE WebKit 2.31.91

3:14 PM Changeset in webkit [274371] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.32

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.31.91 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.31.91, and also the missing ones

for 2.31.90.

1:47 PM Changeset in webkit [274370] by Ryan Haddad
  • 5 edits in trunk

Enable video capture in GPUProcess by default on iOS
https://bugs.webkit.org/show_bug.cgi?id=223061

Patch by Youenn Fablet <youenn@apple.com> on 2021-03-12
Reviewed by Eric Carlson.

Source/WebKit:

Covered by existing tests.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCaptureVideoInGPUProcessEnabled):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
We need to synchronously fill the granted requests, otherwise there is a risk that
the granted requests will be cleared (on page close for instance) and then later filled
for the page that was gone.

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:

(-[GetUserMediaRepromptTestView haveStream:]):
Upgrade timeout period as GPU process capture might take longer.

1:33 PM Changeset in webkit [274369] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ MacOS wk2 ] inspector/debugger/breakpoints/resolved-dump-all-inline-script-pause-locations.html is flakey timing out
https://bugs.webkit.org/show_bug.cgi?id=221759

Uneviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass Timeout while test is being looked at.
1:25 PM Changeset in webkit [274368] by Lauro Moura
  • 2 edits in trunk/Source/WTF

REGRESSION(r274327) [GLIB] 2D Canvas tests timing out after enabling GPUProces in testing
https://bugs.webkit.org/show_bug.cgi?id=223130

Reviewed by Philippe Normand.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:12 PM Changeset in webkit [274367] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Debug wk2 ] imported/w3c/web-platform-tests/wasm/webapi/instantiateStreaming-bad-imports.any.worker.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223131

Unreviewed test gardeing.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass Failure for Debug.
11:04 AM Changeset in webkit [274366] by Jonathan Bedard
  • 2 edits in trunk/Tools

REGRESSION: two webkitscmpy.test.svn_unittest.TestRemoteSvn tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=223006

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py:

(Svn.request): Hard-code timezone delta for Subversion server.

11:03 AM Changeset in webkit [274365] by Manuel Rego Casasnovas
  • 6 edits
    2 adds in trunk

[selectors] :focus-visible matches body after keyboard event
https://bugs.webkit.org/show_bug.cgi?id=223113

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-001.html: Modify the test to verify

that only the element matches :focus-visible (and not the body).

  • web-platform-tests/css/selectors/focus-visible-019-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-019.html: Added new test to check script focus in keyboard event,

and that again only the element matches :focus-visible (and not the body).

Source/WebCore:

Fix the bug with some changes in EventHandler::internalKeyEvent().
When you use TAB (or other key) the |element| variable in this method is the document body,
however that element is not focused (element->focused() is false).
Before this patch we were marking the element as matchin :focus-visible,
however we shouldn't do that if the element is not focused (added a condition to avoid doing that).

Apart from that this patch also fixes a related issue, if a keyboard event handler is changing focus via script
there's a part of this method that takes care of updating the |element| variable.
In that case we have to remove :focus-visible flag from the previous element, and add it to the new one.

Test: imported/w3c/web-platform-tests/css/selectors/focus-visible-001.html
Test: imported/w3c/web-platform-tests/css/selectors/focus-visible-019.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::internalKeyEvent):

LayoutTests:

  • platform/ios/TestExpectations: Skip new test for iOS.
10:49 AM Changeset in webkit [274364] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix debug assertion on bots after r274323.

Was failing to call the completion handler in a early return case.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setQuotaLoggingEnabled):

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

Unreviewed, partial revert of r274286 because this introduced an assertion failure.

  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished):

10:19 AM Changeset in webkit [274362] by commit-queue@webkit.org
  • 12 edits in trunk/Source

Reduce maximum HashTable entry size to 400 bytes
https://bugs.webkit.org/show_bug.cgi?id=223106

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-12
Reviewed by Youenn Fablet.

Source/WebCore:

This should reduce memory use.

  • loader/ResourceLoadStatistics.h:

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::pruneResources):
(WebKit::ResourceLoadStatisticsMemoryStore::aggregatedThirdPartyData const):
(WebKit::ResourceLoadStatisticsMemoryStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain const):
(WebKit::ResourceLoadStatisticsMemoryStore::markAsPrevalentIfHasRedirectedToPrevalent):
(WebKit::ResourceLoadStatisticsMemoryStore::classifyPrevalentResources):
(WebKit::ResourceLoadStatisticsMemoryStore::hasHadUserInteraction):
(WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResource):
(WebKit::ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics):
(WebKit::ResourceLoadStatisticsMemoryStore::isPrevalentResource const):
(WebKit::ResourceLoadStatisticsMemoryStore::isVeryPrevalentResource const):
(WebKit::ResourceLoadStatisticsMemoryStore::isRegisteredAsSubresourceUnder const):
(WebKit::ResourceLoadStatisticsMemoryStore::isRegisteredAsSubFrameUnder const):
(WebKit::ResourceLoadStatisticsMemoryStore::isRegisteredAsRedirectingTo const):
(WebKit::ResourceLoadStatisticsMemoryStore::isGrandfathered const):
(WebKit::ResourceLoadStatisticsMemoryStore::ensureResourceStatisticsForRegistrableDomain):
(WebKit::ResourceLoadStatisticsMemoryStore::createEncoderFromData const):
(WebKit::ResourceLoadStatisticsMemoryStore::mergeStatistics):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
(WebKit::ResourceLoadStatisticsMemoryStore::processStatistics const):
(WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor):
(WebKit::ResourceLoadStatisticsMemoryStore::pruneStatisticsIfNeeded):
(WebKit::ResourceLoadStatisticsMemoryStore::removeDataForDomain):
(WebKit::ResourceLoadStatisticsMemoryStore::insertExpiredStatisticForTesting):

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::addChallengeToChallengeMap):
(WebKit::AuthenticationManager::shouldCoalesceChallenge const):
(WebKit::AuthenticationManager::coalesceChallengesMatching const):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::completeAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:

(WebKit::AuthenticationManager::Challenge::Challenge):

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:

(WebKit::WebResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebKit::WebResourceLoadObserver::statisticsForURL):
(WebKit::WebResourceLoadObserver::takeStatistics):

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.h:

Source/WTF:

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):

9:41 AM Changeset in webkit [274361] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Use refptr to PeerConnectionFactoryInterface
https://bugs.webkit.org/show_bug.cgi?id=222725

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-12
Reviewed by Youenn Fablet.

Use refptr instead of reference to PeerConnectionFactoryInterface.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::createSourceAndRTCTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
9:40 AM Changeset in webkit [274360] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed Windows crash fix after r274252.

  • platform/graphics/win/GraphicsContextCGWin.cpp:

(WebCore::GraphicsContext::platformInit):

9:33 AM Changeset in webkit [274359] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[MacOS wk2] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-updating.html is a flakey failure
https://bugs.webkit.org/show_bug.cgi?id=222210

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass Failure until test issues can be resolved.
9:22 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
8:25 AM Changeset in webkit [274358] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] Crashes deep in GStreamer under gst_element_add_pad
https://bugs.webkit.org/show_bug.cgi?id=222763

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-12
Reviewed by Xabier Rodriguez-Calvar.

Rely on select-streams event to configure only the first video stream of the collection
received on the bus. The select-stream decodebin3 signal is not recommended, and seems
broken anyway, because no selecting audio streams was still leading to audio decode pads
being added, leading to crashes.

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::handleMessage):
(WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline):
(WebCore::ImageDecoderGStreamer::InnerDecoder::selectStream): Deleted.

  • platform/graphics/gstreamer/ImageDecoderGStreamer.h:
8:14 AM Changeset in webkit [274357] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Cancel image loader events after first dispatch
https://bugs.webkit.org/show_bug.cgi?id=218556

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-12
Reviewed by Ryosuke Niwa.

Cancel image loader events after first dispatch.
Also change EventSender to use WeakPtr.

  • dom/EventSender.h:

(WebCore::EventSender<T>::dispatchEventSoon):
(WebCore::EventSender<T>::dispatchPendingEvents):

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::dispatchPendingErrorEvent):

  • loader/ImageLoader.h:
7:08 AM Changeset in webkit [274356] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

[MacOS] Reenable Audio Capture in GPUProcess by default
https://bugs.webkit.org/show_bug.cgi?id=223060

Reviewed by Eric Carlson.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCaptureAudioInGPUProcessEnabled):

7:06 AM Changeset in webkit [274355] by graouts@webkit.org
  • 7 edits in trunk

Support animation of perspective-origin property
https://bugs.webkit.org/show_bug.cgi?id=223116

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add an extra 35 PASS results.

  • web-platform-tests/css/css-transforms/animation/perspective-origin-interpolation-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

While we have support for animating "perspective-origin-x" and "perspective-origin-y", which are
not part of the CSS Transforms standard, we do not support animation of "perspective-origin",
which we consider in WebKit to be a shorthand property. All that is needed to address this is to
add CSSPropertyPerspectiveOrigin in the list of animatable shorthand properties when creating
animation wrappers.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

7:02 AM Changeset in webkit [274354] by Carlos Garcia Campos
  • 5 edits in trunk/Source

[GTK] GTK4 crashes with XVFB: GLXBadWindow
https://bugs.webkit.org/show_bug.cgi?id=223108

Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::supportsGLX const): Check if GLX extension is supported and return the base error code.

  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

Handle GLXBadWindow errors in AcceleratedBackingStoreX11.

  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::AcceleratedBackingStoreX11::checkRequirements):
(WebKit::glxErrorCode):
(WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
(WebKit::AcceleratedBackingStoreX11::update):

6:33 AM Changeset in webkit [274353] by graouts@webkit.org
  • 18 edits in trunk

Blending lengths of different types should be allowed outside of the [0-1] range
https://bugs.webkit.org/show_bug.cgi?id=223115

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add an extra 57 PASS results.

  • web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-outside-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-width-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/min-height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/min-width-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/width-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/width-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/perspective-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
  • web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt:

Source/WebCore:

  • platform/Length.cpp:

(WebCore::blendMixedTypes):

6:25 AM Changeset in webkit [274352] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, reverting r274305.
https://bugs.webkit.org/show_bug.cgi?id=223119

Caused several debug layout-tests to crash

Reverted changeset:

"[macOS] Selecting text via mouse drag in image documents
shouldn't trigger click events"
https://bugs.webkit.org/show_bug.cgi?id=223075
https://trac.webkit.org/changeset/274305

5:19 AM Changeset in webkit [274351] by youenn@apple.com
  • 12 edits
    3 adds in trunk

Make RTCDataChannel transferable
https://bugs.webkit.org/show_bug.cgi?id=222965

Reviewed by Eric Carlson.

Source/WebCore:

To transfer a RTCDataChannel to workers, we need to create a new RTCDataChannel using the same data channel backend, which is cross-thread compatible.
We need to make sure we do not miss forwarding any event. And also it is a burden to transfer a data channel that is sending data (say blobs for instance).
For that reason, we currently only allow transferring data channels in the event loop task that created the data channel.

We add the infrastructure to transfer RTCDataChannel in SerializedScriptValue.
This is done by serializing an index to the transfered data channel. The transfered data channel contains state information and an identifier which allows to know
in which process is the data channel to transfer and an identifier to retrieve it from a global map.

We also need to update the code so that data channel backends can change of client.
For that purpose, we delay setting the client to when they are no longer transferable.
At that time, we register the data channel as client to its backed.
In the meantime, the data channel backend will store all messages received so far.
Once client is set, the data channel backend will deliver all messages and state changes to the data channel.

Since client might want to get messages in a worker thread, the client now also registers its context identifier,
which is used to post a task to the right thread.

Test: http/wpt/webrtc/datachannel-worker.html

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::m_contextIdentifier):
(WebCore::RTCDataChannel::close):
(WebCore::rtcDataChannelLocalMap):
(WebCore::RTCDataChannel::canDetach const):
(WebCore::RTCDataChannel::detach):
(WebCore::createClosedChannel):

  • Modules/mediastream/RTCDataChannel.h:

(WebCore::DetachedRTCDataChannel::DetachedRTCDataChannel):
(WebCore::DetachedRTCDataChannel::memoryCost const):

  • Modules/mediastream/RTCDataChannel.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::LibWebRTCDataChannelHandler):
(WebCore::LibWebRTCDataChannelHandler::~LibWebRTCDataChannelHandler):
(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::close):
(WebCore::LibWebRTCDataChannelHandler::OnStateChange):
(WebCore::LibWebRTCDataChannelHandler::checkState):
(WebCore::LibWebRTCDataChannelHandler::OnMessage):
(WebCore::LibWebRTCDataChannelHandler::OnBufferedAmountChange):
(WebCore::LibWebRTCDataChannelHandler::postTask):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::fillTransferMap):
(WebCore::CloneSerializer::dumpRTCDataChannel):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readRTCDataChannel):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::computeMemoryCost const):
(WebCore::SerializedScriptValue::create):
(WebCore::canDetachRTCDataChannels):
(WebCore::SerializedScriptValue::deserialize):

  • bindings/js/SerializedScriptValue.h:
  • platform/mediastream/RTCDataChannelHandler.h:

(WebCore::RTCDataChannelInit::isolatedCopy const):

  • platform/mock/RTCDataChannelHandlerMock.cpp:

(WebCore::RTCDataChannelHandlerMock::setClient):

  • platform/mock/RTCDataChannelHandlerMock.h:

LayoutTests:

  • http/wpt/webrtc/datachannel-worker-expected.txt: Added.
  • http/wpt/webrtc/datachannel-worker.html: Added.
  • http/wpt/webrtc/datachannel-worker.js: Added.

(onmessage):

4:40 AM Changeset in webkit [274350] by aboya@igalia.com
  • 2 edits in trunk/Tools

Unreviewed: Update Alicia's status to reviewer
https://bugs.webkit.org/show_bug.cgi?id=223114

  • Scripts/webkitpy/common/config/contributors.json:
4:36 AM Changeset in webkit [274349] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.31.91

WebKitGTK 2.31.91

4:35 AM Changeset in webkit [274348] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.32

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.31.91 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.31.91.
3:06 AM Changeset in webkit [274347] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/gtk/po

Merge r274063 - [GTK] Update Simplified Chinese translation
https://bugs.webkit.org/show_bug.cgi?id=222845

Patch by Dingzhong Chen <wsxy162@gmail.com> on 2021-03-08
Reviewed by Carlos Garcia Campos.

  • zh_CN.po:
3:06 AM Changeset in webkit [274346] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Tools/buildstream

Merge r274277 - [Flatpak SDK] Update libsoup3
https://bugs.webkit.org/show_bug.cgi?id=223066

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-11
Reviewed by Carlos Garcia Campos.

  • elements/sdk/libsoup3.bst: Bump to version 2.99.2.
3:06 AM Changeset in webkit [274345] by Carlos Garcia Campos
  • 11 edits in releases/WebKitGTK/webkit-2.32

Merge r274330 - [GTK] Bump API version when building with libsoup3
https://bugs.webkit.org/show_bug.cgi?id=223067

Reviewed by Adrian Perez de Castro.

.:

Use 4.1 as the API version when building with soup3 and keep using 5.0 for GTK4. Also make it impossible to
build with GTK4 and soup2.

  • Source/PlatformGTK.cmake:
  • Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

Use WEBKITGTK_API_DOC_VERSION instead of WEBKITGTK_API_VERSION for the gtkdoc configuration file.

  • PlatformGTK.cmake:

Source/WebKit:

  • PlatformGTK.cmake: Use WEBKITGTK_API_DOC_VERSION instead of WEBKITGTK_API_VERSION for gtkdoc config files
  • gtk/webkit2gtk-web-extension.pc.in: Add variables for gtk pkg-config file and libsoup version.
  • gtk/webkit2gtk.pc.in: Ditto.

Tools:

Use WEBKITGTK_API_DOC_VERSION instead of WEBKITGTK_API_VERSION.

  • gtk/manifest.txt.in:
3:06 AM Changeset in webkit [274344] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.32

Merge r274275 - Unreviewed. [GTK][WPE] Bump libsoup3 version to 2.99.3

.:

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

Source/WebCore:

Bring back support for logging body data.

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::setupLogger):

Source/WTF:

  • wtf/Platform.h:
  • wtf/URL.h:
3:06 AM Changeset in webkit [274343] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

[WPE] WebKitMediaKeySystemPermissionRequest.h missing in top-level header
https://bugs.webkit.org/show_bug.cgi?id=223076

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-11
Reviewed by Adrian Perez de Castro.

  • UIProcess/API/wpe/WebKitMediaKeySystemPermissionRequest.h: Fix copy/paste mistake from GTK version of this

header.

  • UIProcess/API/wpe/webkit.h: The WebKitMediaKeySystemPermissionRequest header has to be

included here so apps can consume this new API.

3:06 AM Changeset in webkit [274342] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r274290 - REGRESSION(r274270): Broke WebKitSecurityOrigin docs
https://bugs.webkit.org/show_bug.cgi?id=223077

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-11
Reviewed by Darin Adler.

  • UIProcess/API/glib/WebKitSecurityOrigin.cpp:
3:06 AM Changeset in webkit [274341] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.32

Merge r274270 - REGRESSION(r272469): [WPE][GTK] Epiphany UI process crashes when downloading PDFs, WebKitSecurityOrigin should use SecurityOriginData
https://bugs.webkit.org/show_bug.cgi?id=222943

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-11
Reviewed by Alex Christensen.

Source/WebKit:

Since r272469, WebCore::SecurityOrigin no longer accepts custom protocols except those
registered with LegacySchemeRegistry. WebPage registers all custom protocols, but
WebPageProxy does not, so WebCore::SecurityOrigin now only supports custom protocols in the
web process, not the UI process. This causes Epiphany to crash when the protocol of its
WebKitSecurityOrigin is unexpectedly NULL.

Alex wants to reduce usage of WebCore::SecurityOrigin outside the web process, so instead of
registering custom protocols with LegacySchemeRegistry in the UI process -- making it harder
to eventually get rid of LegacySchemeRegistry -- we will transition WebKitSecurityOrigin
from WebCore::SecurityOrigin to WebCore::SecurityOriginData, which is a simple data store
for <protocol, host, port>. This is mostly sufficient to implement WebKitSecurityOrigin,
except for webkit_security_origin_is_opaque(). I considered multiple ways to handle this,
but ultimately decided to just deprecate it. Epiphany is the only client using this function
in order to implement a WebKitSecurityOrigin equality operation, and it does so using
origins that should never be opaque, so there are no compatibility concerns here.

  • UIProcess/API/glib/WebKitAuthenticationRequest.cpp:

(webkit_authentication_request_get_security_origin):

  • UIProcess/API/glib/WebKitSecurityOrigin.cpp:

(_WebKitSecurityOrigin::_WebKitSecurityOrigin):
(webkitSecurityOriginCreate):
(webkitSecurityOriginGetSecurityOriginData):
(webkit_security_origin_new):
(webkit_security_origin_new_for_uri):
(webkit_security_origin_get_protocol):
(webkit_security_origin_get_host):
(webkit_security_origin_get_port):
(webkit_security_origin_is_opaque):
(webkit_security_origin_to_string):
(webkitSecurityOriginGetSecurityOrigin): Deleted.

  • UIProcess/API/glib/WebKitSecurityOriginPrivate.h:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(addOriginToMap):

  • UIProcess/API/gtk/WebKitSecurityOrigin.h:
  • UIProcess/API/wpe/WebKitSecurityOrigin.h:

Tools:

Add a test to ensure security origins can be successfully created for custom protocols.
Also, update the tests to accomodate the deprecation of webkit_security_origin_is_opaque().
Notably, origins for data:// URIs are no longer special.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:

(testSecurityOriginBasicConstructor):
(testSecurityOriginURIConstructor):
(testSecurityOriginDefaultPort):
(testSecurityOriginFileURI):
(testSecurityOriginDataURI):
(testCustomProtocolOrigin):
(beforeAll):
(testOpaqueSecurityOrigin): Deleted.

3:06 AM Changeset in webkit [274340] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.32

Merge r274210 - [WPE][GTK] Introduce NeedsUnbrandedUserAgent quirk and use it for accounts.google.com, docs.google.com, and drive.google.com
https://bugs.webkit.org/show_bug.cgi?id=222978

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-10
Reviewed by Carlos Garcia Campos.

Source/WebCore:

This is a follow-up to bug #222039. I simplified our Google user agent quirks too much in
that bug, breaking accounts.google.com, docs.google.com, and drive.google.com for clients
that set application name and version in the user agent. What we really need here is an
empty quirk in order to ensure our most boring standard user agent is used without any
application branding or customizations. But we no longer need to fake platform or browser,
as was required in the past.

Additionaly, clean up the code a bit. We shouldn't need to compute domain and baseDomain
many separate times, for instance. There's also no need to perform string operations to
add the WebKit version to the user agent, since the version has been frozen for several
years now and is likely to remain frozen indefinitely. Finally, remove some forgotten
leftovers of our Internet Explorer and Windows quirks that were previously used for Google
Docs.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresFirefoxBrowser):
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::urlRequiresUnbrandedUserAgent):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::isGoogle): Deleted.
(WebCore::urlRequiresLinuxDesktopPlatform): Deleted.

  • platform/UserAgentQuirks.h:
  • platform/glib/UserAgentGLib.cpp:

(WebCore::buildUserAgentString):
(WebCore::standardUserAgent):
(WebCore::standardUserAgentForURL):
(WebCore::versionForUAString): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::assertUserAgentForURLHasEmptyQuirk):
(TestWebKitAPI::TEST):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk): Deleted.

3:05 AM Changeset in webkit [274339] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r274073 - Unreviewed, reverting r273197.
https://bugs.webkit.org/show_bug.cgi?id=222909

Revert of r273084 broke building on Linux platforms

Reverted changeset:

"Remove unused isGoogle function"
https://bugs.webkit.org/show_bug.cgi?id=222227
https://trac.webkit.org/changeset/273197

3:05 AM Changeset in webkit [274338] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.32

Merge r274070 - Unreviewed, reverting r273084.
https://bugs.webkit.org/show_bug.cgi?id=222905

User agent quirks still needed after all

Reverted changeset:

"[GTK] Remove all Google user agent quirks except for Google
Docs"
https://bugs.webkit.org/show_bug.cgi?id=222039
https://trac.webkit.org/changeset/273084

3:05 AM Changeset in webkit [274337] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.32

Merge r273997 - Regression(r268097): WKWebView.URL is nil in the processDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=222809

Reviewed by Michael Catanzaro.

Source/WebKit:

There was a PageLoadState::Transaction in resetStateAfterProcessTermination() that
was previously making sure we would not clear the WebView's URL before calling the
processDidTerminate client delegate. Now that we call the client delegate in a
separate function (WebPageProxy::dispatchProcessDidTerminate), we need to make move
the PageLoadState::Transaction to the caller in
WebProcessProxy::processDidTerminateOrFailedToLaunch(), so that its scope covers
both resetStateAfterProcessTermination() & dispatchProcessDidTerminate() calls.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetStateAfterProcessTermination):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:

(TEST):

3:05 AM Changeset in webkit [274336] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r273713 - Have WebProcessProxy::requestTermination() call processDidTerminateOrFailedToLaunch()
https://bugs.webkit.org/show_bug.cgi?id=222577

Reviewed by Geoffrey Garen.

Have WebProcessProxy::requestTermination() call processDidTerminateOrFailedToLaunch() instead of duplicating
the code. It was error-prone to have 2 separate code paths whether the process exited due to a crash or a
termination request. It led to Bug 222574 for example because we added some logic to remove the process from
the cache in processDidTerminateOrFailedToLaunch() but had failed to do so in requestTermination().

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::requestTermination):

  • UIProcess/WebProcessProxy.h:
3:05 AM Changeset in webkit [274335] by Carlos Garcia Campos
  • 3 edits
    3 adds in releases/WebKitGTK/webkit-2.32

Merge r273905 - In case of POST navigation redirected by a 302, the 'Origin' header is kept in the redirected request
https://bugs.webkit.org/show_bug.cgi?id=222653
<rdar://problem/74983521>

Reviewed by Alex Christensen.

Source/WebCore:

Remove Origin header if the navigation request goes from POST to GET.
This aligns with other browsers and removes some known interop issues.
This is consistent with WebKit not sending Origin headers for GET navigations.

Test: http/wpt/fetch/navigation-post-to-get-origin.html

  • loader/DocumentLoader.cpp:

(WebCore::isRedirectToGetAfterPost):
(WebCore::DocumentLoader::willSendRequest):

LayoutTests:

  • http/wpt/fetch/echo-origin.py: Added.
  • http/wpt/fetch/navigation-post-to-get-origin-expected.txt: Added.
  • http/wpt/fetch/navigation-post-to-get-origin.html: Added.
3:05 AM Changeset in webkit [274334] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WTF

Merge r273841 - std::is_literal_type causes -Wdeprecated-declarations warning with GCC 11
https://bugs.webkit.org/show_bug.cgi?id=220662
<rdar://problem/73509470>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-03
Reviewed by Darin Adler.

Ignore the warning. It would be better to not use the deprecated std::is_literal_type, but
this works for now.

  • wtf/Variant.h:
3:05 AM Changeset in webkit [274333] by Carlos Garcia Campos
  • 15 edits
    1 move
    7 adds in releases/WebKitGTK/webkit-2.32

Merge r273820 - Report the correct document uri in the case of a ContentSecurityPolicyClient
https://bugs.webkit.org/show_bug.cgi?id=222489
<rdar://problem/73774118>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html

http/tests/security/contentSecurityPolicy/report-document-uri-blob.html

Previously we were setting the document URI to be the blocked URI in
the case where we were using a ContentSecurityPolicyClient and didn't
have access to the document URL. This patch passes the document URL
to the network process when loading a resource so we can properly set
the document URI in this case.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::shouldReportProtocolOnly):
(WebCore::ContentSecurityPolicy::deprecatedURLForReporting const):
(WebCore::ContentSecurityPolicy::reportViolation const):
Follow spec guidelines https://www.w3.org/TR/CSP2/#violation-reports
and set the document URI to be the URI's scheme if it is a globally
unique identifier.

In the case where we are using a client and don't have the document
URL, we should at least strip the blocked URL before reporting to align
with the spec.

  • page/csp/ContentSecurityPolicy.h:

(WebCore::ContentSecurityPolicy::setDocumentURL):

Source/WebKit:

Pass the document URL from the Network Process when we schedule a load
in case we need to report a CSP violation in NetworkLoadChecker.

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::contentSecurityPolicy):
The regular toString() method sets file:// URLs to null. We should use
toRawString() so we can report the scheme if the source origin is a
local file, as per the W3C spec.

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::PingLoad):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

Tools:

Rename OverrideContentSecurityPolicy.mm to ContentSecurityPolicy.mm
so we can use it for more general purpose CSP testing.

Add a test for document-uri reporting for file:, data: and about: protocols.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ContentSecurityPolicy.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/OverrideContentSecurityPolicy.mm.

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/csp-document-uri-report.html: Added.

LayoutTests:

Layout test coverage for redirects using a ContentSecurityPolicyClient
and blob files.

  • http/tests/security/contentSecurityPolicy/report-document-uri-blob-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/report-document-uri-blob.html: Added.
  • http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect.html: Added.
  • platform/mac-wk1/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect-expected.txt: Added.
  • platform/win/http/tests/security/contentSecurityPolicy/report-document-uri-after-blocked-redirect-expected.txt: Added.
  • platform/win/TestExpectations:

Blob URLs timeout on win.

3:05 AM Changeset in webkit [274332] by Carlos Garcia Campos
  • 10 edits in releases/WebKitGTK/webkit-2.32

Merge r273735 - REGRESSION(r263094): [GTK][WPE] API test /webkit/WebKitWebContext/languages is failing
https://bugs.webkit.org/show_bug.cgi?id=188111

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-03-02
Reviewed by Michael Catanzaro.

Source/WebKit:

The GLib API allows to change the user preferred languages after the web process is created. Since r263094 we
are no loner sending the new overrides to the web process. Instead of calling overrideUserPreferredLanguages()
we now set the overrides in the WebProcessPool configuration, so that we can remove the language observer.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_set_preferred_languages): Use WebProcessPool::setOverrideLanguages() instead of
overrideUserPreferredLanguages().

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::WebProcessPool) Remove the language observer registration.
(WebKit::WebProcessPool::~WebProcessPool): Remove the language observer unregistration.
(WebKit::WebProcessPool::setOverrideLanguages): Update the language overrides in the configuration and notify
all processes.
(WebKit::WebProcessPool::languageChanged): Deleted.

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::userPreferredLanguagesChanged const): Call overrideUserPreferredLanguages() again here.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:

(testWebContextLanguages): Invalid locale is ignored now instead of throwing a exception.

  • TestWebKitAPI/glib/TestExpectations.json: Remove test expectation now that it passes again.
3:05 AM Changeset in webkit [274331] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r273643 - [GTK] Fails to build in i386: static assertion failed: divisor must be a power of two
https://bugs.webkit.org/show_bug.cgi?id=222480

Reviewed by Carlos Garcia Campos.

  • Platform/IPC/StreamConnectionBuffer.h:

(IPC::StreamConnectionBuffer::headerSize):

1:31 AM Changeset in webkit [274330] by Carlos Garcia Campos
  • 11 edits in trunk

[GTK] Bump API version when building with libsoup3
https://bugs.webkit.org/show_bug.cgi?id=223067

Reviewed by Adrian Perez de Castro.

.:

Use 4.1 as the API version when building with soup3 and keep using 5.0 for GTK4. Also make it impossible to
build with GTK4 and soup2.

  • Source/PlatformGTK.cmake:
  • Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

Use WEBKITGTK_API_DOC_VERSION instead of WEBKITGTK_API_VERSION for the gtkdoc configuration file.

  • PlatformGTK.cmake:

Source/WebKit:

  • PlatformGTK.cmake: Use WEBKITGTK_API_DOC_VERSION instead of WEBKITGTK_API_VERSION for gtkdoc config files
  • gtk/webkit2gtk-web-extension.pc.in: Add variables for gtk pkg-config file and libsoup version.
  • gtk/webkit2gtk.pc.in: Ditto.

Tools:

Use WEBKITGTK_API_DOC_VERSION instead of WEBKITGTK_API_VERSION.

  • gtk/manifest.txt.in:
1:19 AM Changeset in webkit [274329] by graouts@webkit.org
  • 8 edits in trunk

Fix interpolation of perspective property
https://bugs.webkit.org/show_bug.cgi?id=223111

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add an extra 59 PASS results, although we also have 18 new FAIL results. Of those
new failures, 16 are due to what I believe to be an issue in the WPT test and I filed
https://github.com/web-platform-tests/wpt/pull/28036 to address this. With this change
in the test, we pass all perspective interpolation tests.

  • web-platform-tests/css/css-transforms/animation/perspective-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/perspective-interpolation-expected.txt:

Source/WebCore:

In order to correctly interplate the "perspective" CSS property, we must not interpolate
between "none" values and lengths. To do this, we add a new wrapper for this property with
a canInterpolate() implementation that uses RenderStyle::hasPerspective() to determine
whether we're dealing with a "none" value.

We also had to make a change to the way the "none" value is represented internally, since it
used to be 0 although the spec (https://drafts.csswg.org/css-transforms-2/#perspective-property)
says "perspective: 0 in a stylesheet will still serialize back as 0". So we now change the
initial value to be -1, which is fine since negative values are otherwise not allowed.

To correctly support this, we must also change consumePerspective() to no longer disallow the
0 value at parse time.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::PerspectiveWrapper::PerspectiveWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumePerspective):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasPerspective const):
(WebCore::RenderStyle::initialPerspective):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertPerspective):

Mar 11, 2021:

11:14 PM Changeset in webkit [274328] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION (r267775): Web Share API Level 2 is incorrectly disabled
https://bugs.webkit.org/show_bug.cgi?id=223110

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Through a series of minor mishaps related to r267623 and r267775,
the current state of the default value of WebShareFileAPIEnabled
in modern WebKit does not match what it was changed to in r267762
(is it now instead off everywhere).

Fix this regression by copying the condition from WebShareEnabled.

10:57 PM Changeset in webkit [274327] by Said Abou-Hallawa
  • 13 edits in trunk

[GPUP] Enable 2D Canvas in layout tests by default
https://bugs.webkit.org/show_bug.cgi?id=222835

Reviewed by Simon Fraser.

Source/WTF:

Move UseGPUProcessForCanvasRenderingEnabled from WebPreferencesInternal
to WebPreferencesExperimental so that the WebKitTestRunner will turn it
on by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:

Some of the canvas layout tests are still failing when GPUP is enabled
for 2D Canvas. Skip these tests for now.

  • http/tests/canvas/color-fonts/fill-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-4.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-4.html:

webkit.org/b/222881

  • inspector/canvas/memory.html:

webkit.org/b/222880

9:56 PM Changeset in webkit [274326] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

[GPU Process] Encoding buffer for DisplayList items should be aligned to 8 bytes
https://bugs.webkit.org/show_bug.cgi?id=223096

Reviewed by Simon Fraser.

Ensure the static array in ItemBuffer::append() is aligned to 8 bytes.
So each member in the encoded DisplayList::Item can be aligned to its
alignment requirement

  • platform/graphics/displaylists/DisplayListItemBuffer.h:

(WebCore::DisplayList::ItemBuffer::append):

9:43 PM Changeset in webkit [274325] by sbarati@apple.com
  • 9 edits in trunk/Source

Adopt VM_FLAGS_PERMANENT for the config vm mapping
https://bugs.webkit.org/show_bug.cgi?id=222086
<rdar://74402690>

Reviewed by Yusuke Suzuki and Mark Lam.

Source/JavaScriptCore:

  • runtime/JSCConfig.h:

(JSC::Config::configureForTesting):

Source/WebKit:

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

(WebKit::XPCServiceMain):

Source/WTF:

  • wtf/PlatformHave.h:
  • wtf/Threading.cpp:

(WTF::initialize):

  • wtf/WTFConfig.cpp:

(WTF::setPermissionsOfConfigPage):

  • wtf/WTFConfig.h:

(WTF::setPermissionsOfConfigPage):

8:48 PM Changeset in webkit [274324] by Chris Dumez
  • 25 edits in trunk/Source

Introduce ensureOnMainThread()
https://bugs.webkit.org/show_bug.cgi?id=223105

Reviewed by Darin Adler.

Introduce ensureOnMainThread(), similarly to the recently added ensureOnMainThreadRunLoop(). It runs
the task synchronously when on the main thread, otherwise dispatches the task to the main thread.

Source/WebCore:

  • accessibility/AccessibilityObjectInterface.h:

(WebCore::Accessibility::performFunctionOnMainThread):
(WebCore::Accessibility::retrieveValueFromMainThread):
(WebCore::Accessibility::retrieveAutoreleasedValueFromMainThread):

  • dom/MessagePort.cpp:

(WebCore::MessagePort::close):

  • dom/messageports/MessagePortChannelProviderImpl.cpp:

(WebCore::MessagePortChannelProviderImpl::createNewMessagePortChannel):
(WebCore::MessagePortChannelProviderImpl::entangleLocalPortInThisProcessToRemote):
(WebCore::MessagePortChannelProviderImpl::messagePortDisentangled):
(WebCore::MessagePortChannelProviderImpl::messagePortClosed):
(WebCore::MessagePortChannelProviderImpl::postMessageToRemote):
(WebCore::MessagePortChannelProviderImpl::takeAllMessagesForPort):
(WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
(WebCore::MessagePortChannelProviderImpl::performActionOnMainThread): Deleted.

  • dom/messageports/MessagePortChannelProviderImpl.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enqueueTaskForDispatcher):

  • page/WheelEventTestMonitor.cpp:

(WebCore::WheelEventTestMonitor::scheduleCallbackCheck):

  • platform/GenericTaskQueue.cpp:

(WebCore::TaskDispatcher<Timer>::postTask):

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

(ensureOnMainThread): Deleted.

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

(-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::invalidateFontCache):

  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::maybeBecomeReadyForMoreMediaData):

  • platform/mediastream/CaptureDeviceManager.cpp:

(WebCore::CaptureDeviceManager::deviceChanged):

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::applyRotation):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSourceFactory::beginInterruption):
(WebCore::CoreAudioCaptureSourceFactory::endInterruption):
(WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::runOnMainThread):

Source/WebKitLegacy:

  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::setOriginDetails):

Source/WTF:

  • wtf/MainThread.cpp:

(WTF::ensureOnMainThread):

  • wtf/MainThread.h:
  • wtf/ThreadSafeRefCounted.h:

(WTF::ThreadSafeRefCounted::deref const):

  • wtf/text/cf/StringImplCF.cpp:

(WTF::StringWrapperCFAllocator::deallocate):

  • wtf/unix/MemoryPressureHandlerUnix.cpp:

(WTF::MemoryPressureHandler::triggerMemoryPressureEvent):

8:42 PM Changeset in webkit [274323] by commit-queue@webkit.org
  • 26 edits in trunk

Add some logging to help debug flaky quota tests
https://bugs.webkit.org/show_bug.cgi?id=222995

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-03-11
Reviewed by Youenn Fablet.

Source/WebCore:

http/tests/IndexedDB/storage-limit* have been flaky on bots since they were added. Add an option to allow
printing some logging in these tests.

No new test as no behavior change in quota management.

  • storage/StorageQuotaManager.cpp:

(WebCore::StorageQuotaManager::requestSpaceOnBackgroundThread):
(WebCore::StorageQuotaManager::tryGrantRequest):
(WebCore::StorageQuotaManager::setLoggingEnabled):

  • storage/StorageQuotaManager.h:

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setQuotaLoggingEnabled):
(WebKit::NetworkProcess::storageQuotaManager):

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

(WKWebsiteDataStoreSetQuotaLoggingEnabled):

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

(WebKit::NetworkProcessProxy::setQuotaLoggingEnabled):

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

(WebKit::WebsiteDataStore::setQuotaLoggingEnabled):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Source/WebKitLegacy:

  • Storage/InProcessIDBServer.cpp:

(InProcessIDBServer::quotaManager):

Tools:

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

(WTR::TestRunner::setQuotaLoggingEnabled):
(WTR::TestRunner::setIsSpeechRecognitionPermissionGranted):
(WTR::TestRunner::setIsMediaKeySystemPermissionGranted):

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

(WTR::TestController::setQuotaLoggingEnabled):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/IndexedDB/storage-limit-1.https.html:
  • http/tests/IndexedDB/storage-limit-2.https.html:
  • http/tests/IndexedDB/storage-limit.https.html:
7:51 PM Changeset in webkit [274322] by Chris Dumez
  • 12 edits in trunk/Source

Drop some unnecessary RunLoop::isMain() / IsMainRunLoop() checks
https://bugs.webkit.org/show_bug.cgi?id=223094

Reviewed by Darin Adler.

Drop some unnecessary RunLoop::isMain() / IsMainRunLoop() checks. callOnMainThread() / ensureOnMainRunLoop()
take care of calling their lambda synchronously when already on the main runloop.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::copyTextureFromMedia):

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::startOnMainThread):

  • UIProcess/API/Cocoa/WKURLSchemeTask.mm:

(getExceptionTypeFromMainRunLoop):
(-[WKURLSchemeTaskImpl dealloc]):

  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::createFrameImageAtIndex):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase accessibilityPluginObject]):

7:24 PM Changeset in webkit [274321] by eric.carlson@apple.com
  • 9 edits in trunk

[GPU Process] http/tests/media/hls/hls-audio-tracks-locale-selection.html fails
https://bugs.webkit.org/show_bug.cgi?id=223102
<rdar://problem/75338802>

Reviewed by Jer Noble.

Source/WebKit:

No new tests, these changes fix an existing test.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess): Set user preferred
languages if parameters.overrideLanguages isn't empty.
(WebKit::GPUConnectionToWebProcess::setUserPreferredLanguages): Set user preferred
languages.

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • Shared/GPUProcessConnectionParameters.h: Add overrideLanguages.

(WebKit::GPUProcessConnectionParameters::encode const):
(WebKit::GPUProcessConnectionParameters::decode):

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::languagesChanged): Send new languages to GPU process.
(WebKit::GPUProcessConnection::GPUProcessConnection): Register for language changes.
(WebKit::GPUProcessConnection::~GPUProcessConnection): Unregister.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeGPUProcessConnectionParameters):Add overrideLanguages.

LayoutTests:

  • platform/wk2/TestExpectations: Unskip the passing test.
7:09 PM Changeset in webkit [274320] by Alan Coon
  • 1 copy in tags/Safari-611.1.21.81.1

Tag Safari-611.1.21.81.1.

6:55 PM Changeset in webkit [274319] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.81-branch/Source/WebKit

Cherry-pick r274295. rdar://problem/75344113

[macOS] Add additional telemetry to WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=223080

Reviewed by Brent Fulgham.

Add additional telemetry to WebContent sandbox on macOS.

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

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

6:46 PM Changeset in webkit [274318] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.81-branch/Source

Versioning.

WebKit-7611.1.21.81.1

6:31 PM Changeset in webkit [274317] by Alan Coon
  • 1 copy in tags/Safari-611.1.21.1.9

Tag Safari-611.1.21.1.9.

6:27 PM Changeset in webkit [274316] by Russell Epstein
  • 1 copy in branches/safari-611.1.21.81-branch

New branch.

6:10 PM Changeset in webkit [274315] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

REGRESSION (r274264) [MacOS Wk1] compositing/visibility/iframe-visibility-hidden.html is a flakey image failure
https://bugs.webkit.org/show_bug.cgi?id=223104

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:37 PM Changeset in webkit [274314] by Amir Mark Jr.
  • 2 edits in trunk/Tools

Adding myself as a committer in the contributors file
N/A

N/A

  • Scripts/webkitpy/common/config/contributors.json: Added myself as a committer
4:56 PM Changeset in webkit [274313] by mark.lam@apple.com
  • 2 edits in trunk/Source/WebCore

[BigSur wk1 arm64] platform/mac/fast/objc/longlongTest.html is a consistent failure.
https://bugs.webkit.org/show_bug.cgi?id=223051

Reviewed by Chris Dumez and Yusuke Suzuki.

The issue is that the test is expecting convertValueToObjcValue()'s conversion of
double to long long to follow x86_64 semantics. I don't think there's a
specification for this behavior (falls under undefined behavior). I'll just
change the code such that it emulates x86_64 behavior to placate the test.

Test covered by platform/mac/fast/objc/longlongTest.html.

  • bridge/objc/objc_utility.mm:

(JSC::Bindings::convertDoubleToLongLong):
(JSC::Bindings::convertValueToObjcValue):

4:47 PM Changeset in webkit [274312] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

AI validator patchpoint should read heap top
https://bugs.webkit.org/show_bug.cgi?id=223052
<rdar://75087095>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/private-methods-inheritance.js: Added.

(A):
(A.prototype.x):
(B.prototype.y):
(B):

Source/JavaScriptCore:

Currently, the patchpoint doesn't specify any reads, which allows it to be moved around by B3
and can cause false positives since it at least read the structure ID for comparing values.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::validateAIState):

4:43 PM Changeset in webkit [274311] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[iOS, macOS] Re-allow WebContent sandbox permissions for specific /etc files
https://bugs.webkit.org/show_bug.cgi?id=223088
<rdar://problem/75332107>

Reviewed by Per Arne Vollan.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
4:22 PM Changeset in webkit [274310] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

[macOS] override the background color of PDF documents to match PDFKit
https://bugs.webkit.org/show_bug.cgi?id=223091
<rdar://problem/74584770>

Reviewed by Tim Horton.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):

4:12 PM Changeset in webkit [274309] by Alan Coon
  • 1 copy in tags/Safari-612.1.5.4

Tag Safari-612.1.5.4.

4:08 PM Changeset in webkit [274308] by Alexey Shvayka
  • 25 edits
    5 adds in trunk

Align JSGlobalObject::defineOwnProperty() with the spec and other runtimes
https://bugs.webkit.org/show_bug.cgi?id=203456

Reviewed by Robin Morisset.

JSTests:

  • microbenchmarks/global-var-put-to-scope.js: Added.
  • stress/eval-func-decl-in-frozen-global.js:

Object.freeze() redefines all global variables as ReadOnly, including hoisted var error.
Aligns with V8.

  • stress/global-object-define-own-property-put-to-scope.js: Added.
  • stress/global-object-define-own-property.js: Added.
  • stress/to-this-before-arrow-function-closes-over-this-that-starts-as-lexical-environment.js:

Fix unwanted name conflict, which was an error in the original test, not an intended part of it.
Also, remove misleading comment on defineProperty and assert accessors are created on global object.
Aligns with V8.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-define-own-property-unforgeable-same-origin-expected.txt: Added.
  • web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-define-own-property-unforgeable-same-origin.html: Added.

Source/JavaScriptCore:

Per spec, top-level var bindings are non-configurable properties of the global
object [1], while undefined / NaN / Infinity are also non-writable [2].

Prior to this change, redefining global var binding with accessor descriptor
failed silently (rather than throwing a TypeError); redefining with data or
generic descriptor created a structure property, which took precedence over
symbol table entry in JSGlobalObject::getOwnPropertySlot(), effectively
destroying live binding between global.foo and var foo.

This patch re-engineers JSGlobalObject::defineOwnProperty(), fixing both issues
mentioned above. If defineOwnProperty() override is removed, there is no way
a live binding can be maintained.

In a follow-up change, JSGlobalObject::getOwnPropertySlot() will be updated to
search symbol table first, aligning it with the spec [3], put(), and
defineOwnProperty(). Apart from consistency, this will bring a mild speed-up.

To accomodate global var binding reassignment right after it becomes read-only
(in the same scope), this patch introduces a watchpoint that can be fired by
JSGlobalObject::defineOwnProperty(). put_to_scope performance is neutral.

Also, this patch removes unused symbolTableGet() overload and orphaned
JSGlobalObject::defineGetter() / JSGlobalObject::defineSetter() declarations.

[1]: https://tc39.es/ecma262/#sec-object-environment-records-createmutablebinding-n-d
[2]: https://tc39.es/ecma262/#sec-value-properties-of-the-global-object
[3]: https://tc39.es/ecma262/#sec-global-environment-records-getbindingvalue-n-s

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::needsDynamicLookup):
(JSC::DFG::ByteCodeParser::parseBlock):

  • jit/JIT.cpp:

(JSC::JIT::emitVarReadOnlyCheck):

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

(JSC::JIT::emit_op_put_to_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_put_to_scope):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::defineOwnProperty):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::varReadOnlyWatchpoint):

  • runtime/JSSymbolTableObject.h:

(JSC::symbolTableGet):

Source/WebCore:

This patch removes location special-casing, which a) incorrectly returned
false if new descriptor was the same as the current one and b) failed
silently otherwise (rather than throwing a TypeError).

However, this change introduces window / document special-casing because
they exist on the structure and as symbol table entries (for performance reasons).
Aligns WebKit with Blink and partly with Gecko.

Test: imported/w3c/web-platform-tests/html/browsers/the-windowproxy-exotic-object/windowproxy-define-own-property-unforgeable-same-origin.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::defineOwnProperty):

LayoutTests:

  • fast/dom/Window/Location/window-override-location-using-defineGetter-expected.txt:
  • fast/dom/Window/Location/window-override-location-using-defineGetter.html:
  • fast/dom/Window/Location/window-override-window-using-defineGetter-expected.txt:
  • fast/dom/Window/Location/window-override-window-using-defineGetter.html:
  • fast/dom/getter-on-window-object2-expected.txt:
  • fast/dom/getter-on-window-object2.html:
4:01 PM Changeset in webkit [274307] by Chris Dumez
  • 34 edits in trunk

Introduce WorkQueue::main() to get the main thread's work queue
https://bugs.webkit.org/show_bug.cgi?id=223087

Reviewed by Geoffrey Garen.

Introduce WorkQueue::main() to get the main thread's work queue. This allows us to port some more code from
dispatch_queue to WorkQueue. It also simplifies some code that has to deal that sometimes needs to run on
the main thread and other times on a background queue. Having a single WorkQueue type to represent both the
main thread and a background queue makes writing such code more convenient.

Source/WebCore:

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::~VideoFullscreenControllerContext):

  • platform/ios/wak/WebCoreThread.mm:

(WebThreadRunOnMainThread):

Source/WebKit:

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::writeFile):
(WebKit::CacheStorage::Engine::readFile):

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):

  • NetworkProcess/cache/NetworkCacheIOChannel.h:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheIOChannelGLib.cpp:

(WebKit::NetworkCache::inputStreamReadReadyCallback):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSyncInThread):
(WebKit::NetworkCache::outputStreamWriteReadyCallback):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::traverse):

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::InitializeWebKit2):

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

(WebKit::XPCServiceEventHandler):

  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:

(+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
(+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::scheduleActivityStateUpdate):

  • UIProcess/PDF/WKPDFHUDView.mm:

(-[WKPDFHUDView initWithFrame:pluginIdentifier:page:]):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::fetchDataAndApply):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKProcessAssertionBackgroundTaskManager _scheduleReleaseTask]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willOpenAppLink):

  • UIProcess/mac/ServicesController.mm:

(WebKit::ServicesController::refreshExistingServices):

Source/WebKitLegacy/mac:

  • Misc/WebDownload.mm:

(callOnDelegateThreadAndWait):

Source/WTF:

  • wtf/WorkQueue.cpp:

(WTF::WorkQueue::main):

  • wtf/WorkQueue.h:
  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueue::constructMainWorkQueue):
(WTF::WorkQueue::WorkQueue):

  • wtf/generic/WorkQueueGeneric.cpp:

(WorkQueue::constructMainWorkQueue):
(WorkQueue::WorkQueue):

Tools:

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::doAsyncTask):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(-[DumpRenderTree _webThreadInvoked]):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptControllerMac::doAsyncTask):
(WTR::UIScriptControllerMac::activateDataListSuggestion):
(WTR::UIScriptControllerMac::removeViewFromWindow):
(WTR::UIScriptControllerMac::addViewToWindow):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptControllerMac::activateDataListSuggestion):
(WTR::UIScriptControllerMac::chooseMenuAction):
(WTR::UIScriptControllerMac::activateAtPoint):

3:59 PM Changeset in webkit [274306] by Chris Dumez
  • 9 edits in trunk/Source

Use CallOnMainThreadAndWait() instead of CallAndMainThread() + BinarySemaphore
https://bugs.webkit.org/show_bug.cgi?id=223093

Reviewed by Geoffrey Garen.

Source/WebCore:

  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::process):

  • fileapi/ThreadableBlobRegistry.cpp:

(WebCore::ThreadableBlobRegistry::blobSize):

  • platform/glib/FileMonitorGLib.cpp:
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
  • platform/mock/MockAudioDestinationCocoa.cpp:

Source/WebKit:

  • NetworkProcess/WebStorage/StorageManagerSet.cpp:
  • UIProcess/API/glib/IconDatabase.cpp:
3:55 PM Changeset in webkit [274305] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[macOS] Selecting text via mouse drag in image documents shouldn't trigger click events
https://bugs.webkit.org/show_bug.cgi?id=223075

Reviewed by Tim Horton.

Improve image overlay support in image documents, by setting -webkit-user-select: text; on the image overlay
container and cursor: text; on each of the text children. Additionally, make it so that text selection in
image overlays doesn't trigger a click event, so that attempting to select text doesn't trigger click events.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateSelectionForMouseDrag):

3:54 PM Changeset in webkit [274304] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Use BinarySemaphore in callOnMainAndWait()
https://bugs.webkit.org/show_bug.cgi?id=223092

Reviewed by Geoffrey Garen.

Use BinarySemaphore in callOnMainAndWait() instead of a Condition, this simplifies the code
a bit. Also templatize the function to make sure we avoid any runtime checks for the
the "mainStyle".

  • wtf/MainThread.cpp:

(WTF::callOnMainAndWait):
(WTF::callOnMainRunLoopAndWait):
(WTF::callOnMainThreadAndWait):

3:11 PM Changeset in webkit [274303] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: WI.Object.singleFireEventListener should not keep a strong reference to thisObject
https://bugs.webkit.org/show_bug.cgi?id=223090

Reviewed by BJ Burg.

  • UserInterface/Base/Object.js:

(WI.Object.addEventListener):
(WI.Object.singleFireEventListener):

3:06 PM Changeset in webkit [274302] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Adopt WKSeparatedModelView for <model>
https://bugs.webkit.org/show_bug.cgi?id=223085
<rdar://problem/75330603>

Reviewed by Sam Weinig.

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:

Make a WKSeparatedModelView for <model>'s UI-side view if available.

2:41 PM Changeset in webkit [274301] by Aditya Keerthi
  • 10 edits in trunk

[iOS][FCR] Update disabled state for button-like controls
https://bugs.webkit.org/show_bug.cgi?id=222318
<rdar://problem/74645980>

Reviewed by Wenson Hsieh.

Source/WebCore:

Update the disabled state for all button-like controls to match the
latest specification. The default disabled state is dark gray text
on a light gray background.

  • css/html.css:

(input:matches([type="button"], [type="submit"], [type="reset"]):disabled,):
(input[type="checkbox"]:indeterminate:disabled):
(input:matches([type="checkbox"], [type="radio"]):disabled):
(input:matches([type="checkbox"], [type="radio"]):checked:disabled):

  • css/legacyFormControlsIOS.css:

(input[type="checkbox"]:indeterminate:disabled,):
(input:matches([type="button"], [type="submit"], [type="reset"]):disabled,):
(input[type="file"]:disabled):
(input:matches([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]):disabled):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintCheckbox):
(WebCore::RenderThemeIOS::paintRadio):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorationsWithFormControlRefresh):

LayoutTests:

Rebaslined tests to account for the new disabled appearance.

  • platform/ios/fast/forms/basic-inputs-expected.txt:
  • platform/ios/fast/forms/basic-selects-expected.txt:
  • platform/ios/fast/forms/disabled-select-change-index-expected.txt:
  • platform/ios/fast/forms/file/file-input-disabled-expected.txt:
  • platform/ios/fast/forms/select-disabled-appearance-expected.txt:
2:40 PM Changeset in webkit [274300] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Use BinarySemaphore in SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously()
https://bugs.webkit.org/show_bug.cgi?id=223089

Reviewed by Geoffrey Garen.

Use BinarySemaphore in SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously() instead of a
Condition. This simplifies the code a bit. Also use callOnMainThread() instead of a main RunLoop
dispatch. We're in WebCore and it seems safer with regards to iOS WK1 (WebThread).

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):

1:48 PM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
1:48 PM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
1:36 PM Changeset in webkit [274299] by Devin Rousso
  • 11 edits
    3 copies
    8 moves
    2 adds
    1 delete in trunk

[macCatalyst] media controls should have macOS styling and behavior
https://bugs.webkit.org/show_bug.cgi?id=223078
<rdar://problem/71857091>

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/mediacontrols/MediaControlsHost.h:

(WebCore::MediaControlsHost::setSimulateCompactMode): Deleted.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::platform const): Added.
(WebCore::MediaControlsHost::compactMode const): Deleted.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::mediaControlsScript):
Combine compactMode and window.isIOSFamily = true; into MediaControlsHost::platform
and add support for PLATFORM(MACCATALYST).

  • Modules/modern-media-controls/controls/layout-item.js:
  • Modules/modern-media-controls/controls/icon-service.js:

(IconService.prototype._fileNameAndPlatformForIconAndLayoutTraits):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype.get layoutTraits):
(MediaController.prototype._supportingObjectClasses):
(MediaController.prototype._controlsClassForLayoutTraits):
(MediaController.prototype._shouldControlsBeAvailable):
Treat "maccatalyst" as LayoutTraits.macOS.
Replace LayoutTraits.Compact with LayoutTraits.watchOS.

  • Modules/modern-media-controls/controls/watchos-activity-indicator.js: Renamed from Modules/modern-media-controls/controls/compact-activity-indicator.js.
  • Modules/modern-media-controls/controls/watchos-activity-indicator.css: Renamed from Modules/modern-media-controls/controls/compact-activity-indicator.css.
  • Modules/modern-media-controls/controls/watchos-media-controls.js: Renamed from Modules/modern-media-controls/controls/compact-media-controls.js.
  • Modules/modern-media-controls/controls/watchos-media-controls.css: Renamed from Modules/modern-media-controls/controls/compact-media-controls.css.
  • Modules/modern-media-controls/media/watchos-media-controls-support.js: Renamed from Modules/modern-media-controls/media/compact-media-controls-support.js.
  • Modules/modern-media-controls/images/watchOS/InvalidCircle.pdf: Renamed from Modules/modern-media-controls/images/watchOS/InvalidCompact.pdf.
  • Modules/modern-media-controls/images/watchOS/PlayCircle.pdf: Renamed from Modules/modern-media-controls/images/watchOS/PlayCompact.pdf.
  • Modules/modern-media-controls/images/watchOS/SpinnerSprite@2x.png: Renamed from Modules/modern-media-controls/images/watchOS/ActivityIndicatorSpriteCompact@2x.png.

Rename Compact*/.compact* to WatchOS*/.watchos*.

  • Modules/modern-media-controls/js-files:
  • WebCore.xcodeproj/project.pbxproj:

Drive-by: Add missing JS/CSS files.

LayoutTests:

  • media/modern-media-controls/watchos-media-controls/watchos-media-controls-constructor.html: Renamed from media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html.
  • media/modern-media-controls/watchos-media-controls/watchos-media-controls-constructor-expected.txt: Renamed from media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt.
  • media/modern-media-controls/watchos-media-controls/watchos-media-controls-layout.html: Renamed from media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html.
  • media/modern-media-controls/watchos-media-controls/watchos-media-controls-layout-expected.txt: Renamed from media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt.
1:14 PM Changeset in webkit [274298] by Russell Epstein
  • 2 edits in branches/safari-611.1.21.1-branch/Source/WebKit

Cherry-pick r274295. rdar://problem/75290553

[macOS] Add additional telemetry to WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=223080

Reviewed by Brent Fulgham.

Add additional telemetry to WebContent sandbox on macOS.

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

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

12:59 PM Changeset in webkit [274297] by commit-queue@webkit.org
  • 5 edits in trunk

Revert r260302
https://bugs.webkit.org/show_bug.cgi?id=223048

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

Source/WebKit:

r260302 was based on the faulty assumption that if we receive bytes from a server after a client certificate challenge,
it must've accepted the client certificate we provided and we should always provide this certificate to this server.
This assumption is faulty because there are servers that request a client certificate but provide a response if you do
not provide a certificate that it accepts. I'm removing this code because as part of my investigation of rdar://73974226
I found that it did not help anything, and since then I committed r269162 which did help solve that problem.

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

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::clientCertificateSuggestedForHost): Deleted.
(WebKit::NetworkSessionCocoa::taskServerConnectionSucceeded): Deleted.
(WebKit::NetworkSessionCocoa::taskFailed): Deleted.
(WebKit::NetworkSessionCocoa::successfulClientCertificateForHost const): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(TestWebKitAPI::clientCertServer): Deleted.
(TestWebKitAPI::BlockPtr<void): Deleted.
(TestWebKitAPI::countClientCertChallenges): Deleted.

12:47 PM Changeset in webkit [274296] by Chris Dumez
  • 15 edits in trunk/Source

Replace some usage of dispatch_queue with WorkQueue now that it supports sync dispatching
https://bugs.webkit.org/show_bug.cgi?id=223073

Reviewed by Darin Adler.

Replace some usage of dispatch_queue with WorkQueue now that it supports sync dispatching
since r274286.

  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::itpQueue):
(WebKit::determineITPState):
(WebKit::doesAppHaveITPEnabled):

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

[macOS] Add additional telemetry to WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=223080

Reviewed by Brent Fulgham.

Add additional telemetry to WebContent sandbox on macOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
12:37 PM Changeset in webkit [274294] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

[WPE] WebKitMediaKeySystemPermissionRequest.h missing in top-level header
https://bugs.webkit.org/show_bug.cgi?id=223076

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-11
Reviewed by Adrian Perez de Castro.

  • UIProcess/API/wpe/WebKitMediaKeySystemPermissionRequest.h: Fix copy/paste mistake from GTK version of this

header.

  • UIProcess/API/wpe/webkit.h: The WebKitMediaKeySystemPermissionRequest header has to be

included here so apps can consume this new API.

12:33 PM Changeset in webkit [274293] by Devin Rousso
  • 6 edits in trunk

Video controls stay on screen indefinitely after interacting with time scrubber
https://bugs.webkit.org/show_bug.cgi?id=223081
<rdar://problem/73935705>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/modern-media-controls/tracks-panel/tracks-panel-prevent-controls-bar-from-fading.html

  • Modules/modern-media-controls/controls/auto-hide-controller.js:

(AutoHideController):
(AutoHideController.prototype.set fadesWhileIdle):
(AutoHideController.prototype.get hasSecondaryUIAttached): Added.
(AutoHideController.prototype.set hasSecondaryUIAttached): Added.
(AutoHideController.prototype.handleEvent):
(AutoHideController.prototype.mediaControlsFadedStateDidChange):
(AutoHideController.prototype.mediaControlsBecameInvisible):
(AutoHideController.prototype.get _canFadeControls): Added.
(AutoHideController.prototype._resetAutoHideTimer):
(AutoHideController.prototype._autoHideTimerFired):
(AutoHideController.prototype._cancelNonEnforcedAutoHideTimer): Deleted.
Simplify the logic of AutoHideController to always listen for "pointer*" events instead
of adding/removing them depending on set fadesWhileIdle. This was problematic because when
the media is paused, ControlsVisibilitySupport will disable fadesWhileIdle, removing all
"pointer*" event listeners, only to re-add them as soon as the media is resumed (this is
especially bad when clicking on the time scrubber track to seek, as this will pause and then
resume the media in rapid succession). Remove _enforceAutoHideTimer as there's no case
where we wouldn't want to be able to delay/cancel the auto-hide based on user interaction.

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.hideTracksPanel):
Now that set hasSecondaryUIAttached also calls _resetAutoHideTimer, don't manually set
this.faded and instead use the logic/timing in AutoHideController.

LayoutTests:

  • media/modern-media-controls/tracks-panel/tracks-panel-prevent-controls-bar-from-fading.html:
  • media/modern-media-controls/tracks-panel/tracks-panel-prevent-controls-bar-from-fading-expected.txt:
12:17 PM Changeset in webkit [274292] by eric.carlson@apple.com
  • 4 edits in trunk/LayoutTests

[Mac] http/tests/media/video-play-stall.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=148597
<rdar://problem/22484300>

Reviewed by Jer Noble.

  • http/tests/media/video-play-stall.html: Increase the amount of data loaded before

stalling because the test assumes that playback begins before the 'stalled' event
is fired, and AVFoundation has become much more conservative about predicting when
is is possible to begin playing without running out of data.

  • platform/mac/TestExpectations:
  • platform/wk2/TestExpectations:
11:27 AM Changeset in webkit [274291] by mark.lam@apple.com
  • 7 edits in trunk

Use tagged pointers in more places in the MetaAllocator code.
https://bugs.webkit.org/show_bug.cgi?id=223055
rdar://69971224

Reviewed by Saam Barati.

Source/WTF:

  1. Made the MetaAllocatorPtr constructor that takes a raw pointer private, and only call it from a static factory method, MetaAllocatorPtr::makeFromRawPointer() to make it clear that we're using an untagged pointer as a source.
  2. Added a MetaAllocatorPtr constructor that retags a pointer. This allows minimizes the window of working with an untagged pointer.
  3. Assert that MetaAllocator::addFreshFreeSpace() is only called at system initialization time.
  4. Removed an unused MetaAllocator::FreeSpaceNode constructor.
  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::release):
(WTF::MetaAllocatorHandle::MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::shrink):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::addFreshFreeSpace):

  • wtf/MetaAllocator.h:

(WTF::MetaAllocator::FreeSpaceNode::FreeSpaceNode): Deleted.

  • wtf/MetaAllocatorHandle.h:
  • wtf/MetaAllocatorPtr.h:

(WTF::MetaAllocatorPtr::makeFromRawPointer):
(WTF::MetaAllocatorPtr::MetaAllocatorPtr):

Tools:

  • TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:
11:25 AM Changeset in webkit [274290] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r274270): Broke WebKitSecurityOrigin docs
https://bugs.webkit.org/show_bug.cgi?id=223077

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-11
Reviewed by Darin Adler.

  • UIProcess/API/glib/WebKitSecurityOrigin.cpp:
11:04 AM Changeset in webkit [274289] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add message filtering check in sandbox
https://bugs.webkit.org/show_bug.cgi?id=223072
<rdar://75314821>

Reviewed by Brent Fulgham.

Message filters cannot be applied unconditionally; their presence needs to be checked first.

  • WebProcess/com.apple.WebProcess.sb.in:
10:52 AM Changeset in webkit [274288] by BJ Burg
  • 2 edits in trunk/Source/JavaScriptCore

Web Inspector: Occasional crash under RemoteConnectionToTargetCocoa::close()
https://bugs.webkit.org/show_bug.cgi?id=223038
<rdar://74920246>

Reviewed by Alex Christensen.

  • inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:

(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::close):
Don't use a capture default, and copy the targetIdentifier.

10:17 AM WebKitGTK/2.32.x edited by Philippe Normand
(diff)
10:10 AM Changeset in webkit [274287] by commit-queue@webkit.org
  • 8 edits in trunk

Apply transferred min/max sizes for intrinsic sizing
https://bugs.webkit.org/show_bug.cgi?id=222557

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-11
Reviewed by Alex Christensen.

Source/WebCore:

Apply transferred min/max sizes for intrinsic sizing [1].
Rename RenderObject::hasAspectRatio to hasIntrinsicAspectRatio
to not be confused with RenderStyle::hasAspectRatio.

Behavior matches Firefox and Chrome.

[1] https://drafts.csswg.org/css-sizing-4/#aspect-ratio-size-transfers

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::needsPreferredWidthsRecalculation const):
(WebCore::RenderBox::computePreferredLogicalWidths):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::childHasAspectRatio):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):

  • rendering/RenderObject.h:

(WebCore::RenderObject::hasIntrinsicAspectRatio const):
(WebCore::RenderObject::hasAspectRatio const): Deleted.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeIntrinsicRatioInformation const):

LayoutTests:

Enable tests that pass now.

10:00 AM Changeset in webkit [274286] by Chris Dumez
  • 14 edits in trunk

Introduce WorkQueue::dispatchSync()
https://bugs.webkit.org/show_bug.cgi?id=223049

Reviewed by Alex Christensen.

Source/WebCore:

Adopt WorkQueue::dispatchSync().

  • platform/glib/FileMonitorGLib.cpp:

(WebCore::FileMonitor::FileMonitor):
(WebCore::FileMonitor::~FileMonitor):

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

(WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):

Source/WebKit:

Adopt WorkQueue::dispatchSync().

  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::waitUntilTasksFinished):
(WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished):

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::IconDatabase):
(WebKit::IconDatabase::~IconDatabase):

Source/WTF:

Introduce WorkQueue::dispatchSync(), which relies on GCD's dispatch_sync() internally on Cocoa
ports. For other ports, it relies on a BinarySemaphore for synchronization.

  • wtf/WorkQueue.cpp:

(WTF::WorkQueue::dispatchSync):

  • wtf/WorkQueue.h:
  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueue::dispatchSync):

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/WorkQueue.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:

(WebKitTestServer::run):

9:58 AM Changeset in webkit [274285] by Ruben Turcios
  • 2 edits in branches/safari-611.1.21.1-branch/Source/WebKit

"Revert r274266. rdar://problem/75290553"

This reverts commit b476dd75db068cab654d25c9eb895bbd5cc60526.

9:57 AM Changeset in webkit [274284] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Cleanup RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=222976

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-11
Reviewed by Sergio Villar Senin.

Various RenderFlexibleBox cleanups.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
(WebCore::RenderFlexibleBox::childHasIntrinsicMainAxisSize const):
(WebCore::RenderFlexibleBox::alignChildren):

9:37 AM Changeset in webkit [274283] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION(r272293) WebArchives originally loaded over HTTP fail to load subresources that would be upgraded to HTTPS
https://bugs.webkit.org/show_bug.cgi?id=223044
<rdar://75228599>

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

Source/WebCore:

Existing WebArchive content has keys that are URLs that have the "http" scheme.
To continue to successfully load these WebArchives, if we can't find a resource and we tried an HTTPS URL,
also try the HTTP URL because it may have been upgraded from HTTP to HTTPS in the loader.
We aren't going to the network anyways, so there is no advantage in pretending to use HTTPS.

  • loader/archive/ArchiveResourceCollection.cpp:

(WebCore::ArchiveResourceCollection::archiveResourceForURL):

Tools:

  • TestWebKitAPI/Tests/mac/LoadWebArchive.mm:

(TestWebKitAPI::TEST):

9:31 AM Changeset in webkit [274282] by sihui_liu@apple.com
  • 4 edits in trunk

Text manipulation: ignore leading and trailing spaces when comparing content for all tokens
https://bugs.webkit.org/show_bug.cgi?id=223057
<rdar://73706436>

Reviewed by Ryosuke Niwa.

Source/WebCore:

In r265361, we started to ignore leading and trailing spaces for first and last tokens in a paragraph. That's
not enough because one paragraph can also contain multiple nodes. Space between two nodes may be collapsed when
two nodes become separated by a new line. In the added test: the space after 'and' is collapsed when div's width
is changed, because TextManipulationController ignores collapsed space, it would compare ' and' with ' and ',
and returns ContentChanged error.

API test: TextManipulation.CompleteTextManipulationParagraphContainsCollapsedSpaces

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::replace):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

9:12 AM Changeset in webkit [274281] by Peng Liu
  • 7 edits in trunk/LayoutTests

[GPUP] Some modern-media-controls tests are flaky when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221685

Reviewed by Eric Carlson.

Fix two flaky tests related to video fullscreen by:
1) Enable "MockVideoPresentationMode".
2) Wait for a video presentation mode change to complete before moving to the next step in the test.
3) Request the video to exit fullscreen before finish the test (to avoid interference with other tests).

  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt:
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html:
  • media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html:
  • platform/mac/TestExpectations:
  • platform/wk2/TestExpectations:
9:03 AM Changeset in webkit [274280] by Ruben Turcios
  • 2 edits in branches/safari-611.1.21.1-branch/Source/ThirdParty/libwebrtc

Cherry-pick r274237. rdar://problem/75316929

CRASH in MergeUVRow_AVX2
https://bugs.webkit.org/show_bug.cgi?id=222996
<rdar://75183835>

Reviewed by Geoff Garen.

Crash logging shows occasional crashes in MergeUVRow_AVX2. These crashes all occur when
calling -[AVAssetImageGenerator copyCGImageAtTime:actualTime:error:]. This path is only used
when there was no prior image generated, and a new image is not available from
AVPlayerItemVideoOutput, which is a scenario which only occurs when doing a software-paint
immedately after a <video> element begins loading. While we should probably stop using
AVAssetImageGenerator, that would be a much riskier change, and wouldn't address the
underlying cause of the crash. Instead, bailing out early when in this state would cause
decoding to fail, but since this scenario only appears to occur for the
AVAssetImageGenerator path, painting would quickly recover as soon as
AVPlayerItemVideoOutput begins emitting frames.

The explanation for these crashes seems to be a mismatch between the size of the libvpx
output frame and the size of the CVPixelBuffer where the converted frame data is being
stored. Add a pre-flight check that will bail out early in this scenario.

  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm: (webrtc::CopyVideoFrameToPixelBuffer):

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

8:25 AM Changeset in webkit [274279] by youenn@apple.com
  • 8 edits in trunk/Source/WebKit

Add camera-related sandbox extensions to GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=223059

Reviewed by Eric Carlson.

Align GPU process sandbox with WebProcess one, including additional camera related sandboxes.
Allow reading preferences for "com.apple.cmio"like done for coremedia.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

  • GPUProcess/GPUProcessCreationParameters.cpp:

(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):

  • GPUProcess/GPUProcessCreationParameters.h:
  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::shouldCreateAppleCameraServiceSandboxExtension):
(WebKit::GPUProcessProxy::GPUProcessProxy):

  • UIProcess/UserMediaProcessManager.cpp:
  • WebProcess/com.apple.WebProcess.sb.in:
7:32 AM Changeset in webkit [274278] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Cleanup references to float and out-of-flow renderers before destroying them.
https://bugs.webkit.org/show_bug.cgi?id=223041
<rdar://72990740>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch takes care of removing float/positioned references when the renderer gets destroyed during the cleanup phase.
(e.g. we initiate renderer (A) removal and it triggers collapsing other, anonymous renderers as well)

Test: fast/block/crash-when-anonymous-float-box-is-removed.html

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers):

LayoutTests:

  • fast/block/crash-when-anonymous-float-box-is-removed-expected.txt: Added.
  • fast/block/crash-when-anonymous-float-box-is-removed.html: Added.
6:31 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
6:31 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
5:48 AM Changeset in webkit [274277] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Update libsoup3
https://bugs.webkit.org/show_bug.cgi?id=223066

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-11
Reviewed by Carlos Garcia Campos.

  • elements/sdk/libsoup3.bst: Bump to version 2.99.2.
4:41 AM Changeset in webkit [274276] by imanol
  • 2 edits in trunk/Tools

Fix contributors file canonical format issue.

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json: Fix canonical format issue.
4:30 AM Changeset in webkit [274275] by Carlos Garcia Campos
  • 8 edits in trunk

Unreviewed. [GTK][WPE] Bump libsoup3 version to 2.99.3

.:

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

Source/WebCore:

Bring back support for logging body data.

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::setupLogger):

Source/WTF:

  • wtf/Platform.h:
  • wtf/URL.h:
3:48 AM Changeset in webkit [274274] by commit-queue@webkit.org
  • 3 edits
    1 delete in trunk

Unreviewed, reverting r274263.
https://bugs.webkit.org/show_bug.cgi?id=223064

Added few broken tests

Reverted changeset:

"AI validator patchpoint should read heap top"
https://bugs.webkit.org/show_bug.cgi?id=223052
https://trac.webkit.org/changeset/274263

2:57 AM Changeset in webkit [274273] by Carlos Garcia Campos
  • 14 edits
    1 add in trunk

[WPE][GTK] Add support for ICC color management
https://bugs.webkit.org/show_bug.cgi?id=177185

Reviewed by Adrian Perez de Castro.

.:

Add optional lcms2 dependency.

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

Source/WebCore:

Add support for ICC color profiles to JPEG and PNG decoders using lcms2 if available.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::~PlatformDisplay):
(WebCore::PlatformDisplay::colorProfile const):

  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::colorProfile const):

  • platform/graphics/x11/PlatformDisplayX11.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::isICCMarker):
(WebCore::readICCProfile):
(WebCore::JPEGImageReader::JPEGImageReader):
(WebCore::JPEGImageReader::decode):
(WebCore::JPEGImageDecoder::~JPEGImageDecoder):
(WebCore::JPEGImageDecoder::clear):
(WebCore::JPEGImageDecoder::setFailed):
(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::decode):
(WebCore::JPEGImageDecoder::setICCProfile):

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::~PNGImageDecoder):
(WebCore::PNGImageDecoder::clear):
(WebCore::PNGImageDecoder::setFailed):
(WebCore::PNGImageDecoder::headerAvailable):
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::decode):
(WebCore::PNGImageDecoder::frameComplete):

  • platform/image-decoders/png/PNGImageDecoder.h:
2:07 AM Changeset in webkit [274272] by imanol
  • 2 edits in trunk/Tools

Add myself as committer to the contributors file.

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json: Added myself as a committer.
1:10 AM Changeset in webkit [274271] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[ macOS debug arm64 ]fast/dom/Range/compareBoundaryPoints-compareHow-exception.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=223050
<rdar://problem/75284949>

Reviewed by Ryosuke Niwa.

Casting a negative double to an unsigned integer type is undefined behavior.
We need to make sure the double value is positive before casting.

No new tests, covered by existing test.

  • bindings/js/JSDOMConvertNumbers.cpp:

(WebCore::toSmallerUInt):

1:09 AM Changeset in webkit [274270] by commit-queue@webkit.org
  • 9 edits in trunk

REGRESSION(r272469): [WPE][GTK] Epiphany UI process crashes when downloading PDFs, WebKitSecurityOrigin should use SecurityOriginData
https://bugs.webkit.org/show_bug.cgi?id=222943

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-11
Reviewed by Alex Christensen.

Source/WebKit:

Since r272469, WebCore::SecurityOrigin no longer accepts custom protocols except those
registered with LegacySchemeRegistry. WebPage registers all custom protocols, but
WebPageProxy does not, so WebCore::SecurityOrigin now only supports custom protocols in the
web process, not the UI process. This causes Epiphany to crash when the protocol of its
WebKitSecurityOrigin is unexpectedly NULL.

Alex wants to reduce usage of WebCore::SecurityOrigin outside the web process, so instead of
registering custom protocols with LegacySchemeRegistry in the UI process -- making it harder
to eventually get rid of LegacySchemeRegistry -- we will transition WebKitSecurityOrigin
from WebCore::SecurityOrigin to WebCore::SecurityOriginData, which is a simple data store
for <protocol, host, port>. This is mostly sufficient to implement WebKitSecurityOrigin,
except for webkit_security_origin_is_opaque(). I considered multiple ways to handle this,
but ultimately decided to just deprecate it. Epiphany is the only client using this function
in order to implement a WebKitSecurityOrigin equality operation, and it does so using
origins that should never be opaque, so there are no compatibility concerns here.

  • UIProcess/API/glib/WebKitAuthenticationRequest.cpp:

(webkit_authentication_request_get_security_origin):

  • UIProcess/API/glib/WebKitSecurityOrigin.cpp:

(_WebKitSecurityOrigin::_WebKitSecurityOrigin):
(webkitSecurityOriginCreate):
(webkitSecurityOriginGetSecurityOriginData):
(webkit_security_origin_new):
(webkit_security_origin_new_for_uri):
(webkit_security_origin_get_protocol):
(webkit_security_origin_get_host):
(webkit_security_origin_get_port):
(webkit_security_origin_is_opaque):
(webkit_security_origin_to_string):
(webkitSecurityOriginGetSecurityOrigin): Deleted.

  • UIProcess/API/glib/WebKitSecurityOriginPrivate.h:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(addOriginToMap):

  • UIProcess/API/gtk/WebKitSecurityOrigin.h:
  • UIProcess/API/wpe/WebKitSecurityOrigin.h:

Tools:

Add a test to ensure security origins can be successfully created for custom protocols.
Also, update the tests to accomodate the deprecation of webkit_security_origin_is_opaque().
Notably, origins for data:// URIs are no longer special.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:

(testSecurityOriginBasicConstructor):
(testSecurityOriginURIConstructor):
(testSecurityOriginDefaultPort):
(testSecurityOriginFileURI):
(testSecurityOriginDataURI):
(testCustomProtocolOrigin):
(beforeAll):
(testOpaqueSecurityOrigin): Deleted.

12:41 AM Changeset in webkit [274269] by sihui_liu@apple.com
  • 8 edits
    2 adds in trunk

Indexed DB transactions outdated immediately after it just created
https://bugs.webkit.org/show_bug.cgi?id=216769
<rdar://problem/69321075>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: storage/indexeddb/transaction-state-active-after-creation.html

Set transaction inactive in microtask checkpoint according to spec:
https://html.spec.whatwg.org/#perform-a-microtask-checkpoint

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::IDBTransaction):

  • dom/EventLoop.cpp:

(WebCore::EventLoopTaskGroup::runAtEndOfMicrotaskCheckpoint):

  • dom/EventLoop.h:
  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
(WebCore::MicrotaskQueue::addCheckpointTask):

  • dom/Microtasks.h:
  • dom/TaskSource.h:

LayoutTests:

  • storage/indexeddb/transaction-state-active-after-creation-expected.txt: Added.
  • storage/indexeddb/transaction-state-active-after-creation.html: Added.
Note: See TracTimeline for information about the timeline view.