Timeline



Nov 22, 2020:

7:26 PM Changeset in webkit [270165] by Diego Pino Garcia
  • 5 edits
    1 add in trunk/LayoutTests

[GLIB][GTK] Unreviewed test gardening. Updated expectations and baselines after 270164.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/gtk/editing/selection/simple-line-layout-caret-is-gone-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: Updated after r270103.
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Updated after r270103.
6:52 AM Changeset in webkit [270164] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

[LFC][Integration] Convert some remaining InlineBox access to use inline iterator
https://bugs.webkit.org/show_bug.cgi?id=219244

Reviewed by Zalan Bujtas.

  • dom/Position.cpp:

(WebCore::hasInlineRun):
(WebCore::nextRenderedEditable):
(WebCore::previousRenderedEditable):
(WebCore::hasInlineBoxWrapper): Deleted.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::topOfFirstText const): Deleted.

  • rendering/RenderText.h:
5:52 AM Changeset in webkit [270163] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Only process floats that fit the current line.
https://bugs.webkit.org/show_bug.cgi?id=219239

Reviewed by Antti Koivisto.

Now that we process floats as soft wrap opportunities, all the intrusive logic can be removed.
Any float that we put on the line is considered intrusive and shrinks the available space.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::operator() const):
(WebCore::Layout::LineCandidate::reset):
(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::constraintsForLine):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::LineBuilder::handleFloatOrInlineContent):
(WebCore::Layout::LineBuilder::rebuildLine):
(WebCore::Layout::LineCandidate::InlineContent::continuousContent const): Deleted.
(WebCore::Layout::LineCandidate::FloatContent::list const): Deleted.
(WebCore::Layout::LineCandidate::FloatContent::intrusiveWidth const): Deleted.
(WebCore::Layout::LineCandidate::FloatContent::append): Deleted.
(WebCore::Layout::LineCandidate::FloatContent::reset): Deleted.
(WebCore::Layout::LineBuilder::nextContentForLine): Deleted.
(WebCore::Layout::LineBuilder::commitFloats): Deleted.
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent): Deleted.

  • layout/inlineformatting/InlineLineBuilder.h:
5:11 AM Changeset in webkit [270162] by Philippe Normand
  • 4 edits in trunk/LayoutTests

Unreviewed GLib gardening

Skip WebSpeech-related tests on GTK and WPE because these ports
don't support WebSpeech yet.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
4:02 AM Changeset in webkit [270161] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GStreamer] Gardening webspeech related crash

Unreviewed test gardening.

  • platform/glib/TestExpectations:
12:30 AM Changeset in webkit [270160] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Fix getIndexedParameter indexing crash
https://bugs.webkit.org/show_bug.cgi?id=218601

Patch by Rob Buis <rbuis@igalia.com> on 2020-11-22
Reviewed by Ryosuke Niwa.

Source/WebCore:

Like in setBoundIndexedTransformFeedbackBuffer ASSERT, the index should
always be smaller than size for indexing to be safe, so bail if the index
is greater than or equal to size.

  • html/canvas/WebGLTransformFeedback.cpp:

(WebCore::WebGLTransformFeedback::getBoundIndexedTransformFeedbackBuffer):

LayoutTests:

Add testcase.

  • fast/canvas/webgl/getIndexedParameter-crash-expected.txt: Added.
  • fast/canvas/webgl/getIndexedParameter-crash.html: Added.

Nov 21, 2020:

10:09 PM Changeset in webkit [270159] by commit-queue@webkit.org
  • 3 edits
    1 move in trunk/Source/WebCore

Convert PlatformXRCocoa.cpp to Objective C++
https://bugs.webkit.org/show_bug.cgi?id=219242

Patch by Ada Chan <adachan@apple.com> on 2020-11-21
Reviewed by Tim Horton.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/xr/cocoa/PlatformXRCocoa.mm: Renamed from Source/WebCore/platform/xr/cocoa/PlatformXRCocoa.cpp.
9:51 PM Changeset in webkit [270158] by sihui_liu@apple.com
  • 16 edits
    12 adds in trunk

Implement audio capture for SpeechRecognition on macOS
https://bugs.webkit.org/show_bug.cgi?id=218855
<rdar://problem/71331001>

Reviewed by Youenn Fablet.

Source/WebCore:

Introduce SpeechRecognizer, which performs audio capture and speech recogntion operations. On start,
SpeechRecognizer creates a SpeechRecognitionCaptureSource and starts audio capturing. On stop, SpeechRecognizer
clears the source and stops recognizing. SpeechRecognizer can only handle one request at a time, so calling
start on already started SpeechRecognizer would cause ongoing request to be aborted.

Tests: fast/speechrecognition/start-recognition-then-stop.html

fast/speechrecognition/start-second-recognition.html

  • Headers.cmake:
  • Modules/speech/SpeechRecognitionCaptureSource.cpp: Added.

(WebCore::SpeechRecognitionCaptureSource::SpeechRecognitionCaptureSource):

  • Modules/speech/SpeechRecognitionCaptureSource.h: Added.
  • Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp: Added. SpeechRecognitionCaptureSourceImpl provides

implementation of SpeechRecognitionCaptureSource on when ENABLE(MEDIA_STREAM) is true.
(WebCore::nextLogIdentifier):
(WebCore::nullLogger):
(WebCore::SpeechRecognitionCaptureSourceImpl::SpeechRecognitionCaptureSourceImpl):
(WebCore::SpeechRecognitionCaptureSourceImpl::~SpeechRecognitionCaptureSourceImpl):
(WebCore::SpeechRecognitionCaptureSourceImpl::audioSamplesAvailable): Push data to buffer, signal main thread to
pull from buffer and invoke data callback.
(WebCore::SpeechRecognitionCaptureSourceImpl::sourceStarted):
(WebCore::SpeechRecognitionCaptureSourceImpl::sourceStopped):
(WebCore::SpeechRecognitionCaptureSourceImpl::sourceMutedChanged):

  • Modules/speech/SpeechRecognitionCaptureSourceImpl.h: Added.
  • Modules/speech/SpeechRecognizer.cpp: Added.

(WebCore::SpeechRecognizer::SpeechRecognizer):
(WebCore::SpeechRecognizer::reset):
(WebCore::SpeechRecognizer::start):
(WebCore::SpeechRecognizer::startInternal):
(WebCore::SpeechRecognizer::stop):
(WebCore::SpeechRecognizer::stopInternal):

  • Modules/speech/SpeechRecognizer.h: Added.

(WebCore::SpeechRecognizer::currentClientIdentifier const):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/MediaUtilities.cpp: Added.

(WebCore::createAudioFormatDescription):
(WebCore::createAudioSampleBuffer):

  • platform/cocoa/MediaUtilities.h: Added.
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Move code for creating CMSampleBufferRef to

MediaUtilities.h/cpp so it can shared between SpeechRecognition and UserMedia, as Speech recognition backend
will take CMSampleBufferRef as input.
(WebCore::createAudioFormatDescription): Deleted.
(WebCore::createAudioSampleBuffer): Deleted.

Source/WebKit:

  • UIProcess/SpeechRecognitionPermissionManager.cpp:

(WebKit::SpeechRecognitionPermissionManager::startProcessingRequest): Check and enable mock devices based on
preference as SpeechRecognition needs it for testing.

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::start):
(WebKit::SpeechRecognitionServer::requestPermissionForRequest):
(WebKit::SpeechRecognitionServer::handleRequest):
(WebKit::SpeechRecognitionServer::stop):
(WebKit::SpeechRecognitionServer::abort):
(WebKit::SpeechRecognitionServer::invalidate):
(WebKit::SpeechRecognitionServer::sendUpdate):
(WebKit::SpeechRecognitionServer::stopRequest): Deleted.
(WebKit::SpeechRecognitionServer::abortRequest): Deleted.

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

(WebKit::WebPageProxy::syncIfMockDevicesEnabledChanged):

  • UIProcess/WebPageProxy.h:

LayoutTests:

  • TestExpectations:
  • fast/speechrecognition/start-recognition-in-removed-iframe.html: mark test as async to avoid flakiness.
  • fast/speechrecognition/start-recognition-then-stop-expected.txt: Added.
  • fast/speechrecognition/start-recognition-then-stop.html: Added.
  • fast/speechrecognition/start-second-recognition-expected.txt: Added.
  • fast/speechrecognition/start-second-recognition.html: Added.
  • platform/wk2/TestExpectations:
8:51 PM Changeset in webkit [270157] by Chris Dumez
  • 6 edits
    4 adds in trunk

Poor resampling quality when using AudioContext sampleRate parameter
https://bugs.webkit.org/show_bug.cgi?id=219201

Reviewed by Geoff Garen.

Source/WebCore:

MultiChannelResampler uses a SincResampler per audio channel. In MultiChannelResampler::process(),
it was calling SincResampler::process() for each channel, which would potentially end up calling
MultiChannelResampler::ChannelProvider::provideInput() to provide channel data used for resampling.
The issue was that MultiChannelResampler::ChannelProvider::provideInput() is implemented in such
a way that things will break if provideInput() gets called more than once per channel. When using
an AudioContext's sample rate larger than the hardware sample rate, provideInput() was getting
called more than once per channel and this resulted in very poor resampling quality.

To address the issue, MultiChannelResampler::process() now processes the data in chunks that
are small enough to guarantee that MultiChannelResampler::ChannelProvider::provideInput() will
never get called more than once per audio channel.

The fix is based on the corresponding MultiChannelResampler / SincResampler implementation in
Chrome:

Tests: webaudio/audiocontext-large-samplerate.html

webaudio/audiocontext-low-samplerate.html

  • platform/audio/MultiChannelResampler.cpp:

(WebCore::MultiChannelResampler::ChannelProvider::setProvider):
(WebCore::MultiChannelResampler::ChannelProvider::setCurrentChannel):
(WebCore::MultiChannelResampler::process):

  • platform/audio/MultiChannelResampler.h:
  • platform/audio/SincResampler.cpp:

(WebCore::calculateChunkSize):
(WebCore::SincResampler::updateRegions):

  • platform/audio/SincResampler.h:

LayoutTests:

Add layout test coverage that would hit assertions in debug.

  • webaudio/audiocontext-large-samplerate-expected.txt: Added.
  • webaudio/audiocontext-large-samplerate.html: Added.
  • webaudio/audiocontext-low-samplerate-expected.txt: Added.
  • webaudio/audiocontext-low-samplerate.html: Added.
7:54 PM Changeset in webkit [270156] by Simon Fraser
  • 10 edits in trunk/Source

Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
https://bugs.webkit.org/show_bug.cgi?id=219241

Reviewed by Tim Horton.

Propagate the 'wheelEventGesturesBecomeNonBlocking' setting to the ScrollingTree
via the ScrollingStateFrameScrollingNode, as we do for other settings.

Source/WebCore:

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
(WebCore::AsyncScrollingCoordinator::wheelEventGesturesBecomeNonBlocking const):

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

(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::applicableProperties const):
(WebCore::ScrollingStateFrameScrollingNode::setWheelEventGesturesBecomeNonBlocking):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingTree.cpp:

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

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::setAsyncFrameOrOverflowScrollingEnabled):
(WebCore::ScrollingTree::wheelEventGesturesBecomeNonBlocking const):
(WebCore::ScrollingTree::setWheelEventGesturesBecomeNonBlocking):

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):

7:03 PM Changeset in webkit [270155] by Chris Dumez
  • 6 edits
    4 deletes in trunk

Unreviewed, reverting r270141.

Caused assertions on bots

Reverted changeset:

"Poor resampling quality when using AudioContext sampleRate
parameter"
https://bugs.webkit.org/show_bug.cgi?id=219201
https://trac.webkit.org/changeset/270141

3:03 PM Changeset in webkit [270154] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

AccessibilityObject::FocusedUIElement should not call AXObjectCache::focusedUIElementForPage that can return an isolated object.
https://bugs.webkit.org/show_bug.cgi?id=219238

Reviewed by Chris Fleizach.

Since AXObjectCache::focusedUIElementForPage can return an isolated
object, AccessibilityObject::focusedUIElement should not use it to
determine the focused object. This causes that isolated objects may be
accessed on the main thread when they shouldn't, and even infinite
recursion if this happens when the isolated tree is being built.
This patch changes AccessibilityObject::focusedUIElement to call
AXObjectCache::focusedObjectForPage that always returns another AccessibilityObject.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::focusedObjectForPage):
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::generateIsolatedTree):
(WebCore::AXObjectCache::focusedObject): Deleted.

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::focusedUIElement const):

12:46 PM Changeset in webkit [270153] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move current logicalLeft from ContinuousContent to LineStatus
https://bugs.webkit.org/show_bug.cgi?id=219237

Reviewed by Antti Koivisto.

Retain the content logical right in the LineStatus instead (this is used to measure text properly (see xPos) while finding hyphen position).

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::reset):

  • layout/inlineformatting/InlineContentBreaker.h:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::logicalWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::logicalLeft const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::reset):
(WebCore::Layout::LineCandidate::reset):
(WebCore::Layout::LineBuilder::nextContentForLine):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):

12:12 PM Changeset in webkit [270152] by Simon Fraser
  • 10 edits in trunk/Source

Add an Experimental Features for wheel event gestures becoming non-blocking
https://bugs.webkit.org/show_bug.cgi?id=219236

Reviewed by Sam Weinig.
Source/WebCore:

Add a feature flag for the behavior that is being added via webkit.org/b/218764,
which is that only the first wheel event in a gesture is cancelable.

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

Add a feature flag for the behavior that is being added via webkit.org/b/218764,
which is that only the first wheel event in a gesture is cancelable.

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultWheelEventGesturesBecomeNonBlocking):

  • Shared/WebPreferencesDefaultValues.h:

Source/WebKitLegacy/mac:

Add a feature flag for the behavior that is being added via webkit.org/b/218764,
which is that only the first wheel event in a gesture is cancelable.

  • WebView/WebPreferencesDefaultValues.h:
  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultWheelEventGesturesBecomeNonBlocking):

Source/WTF:

Add a feature flag for the behavior that is being added via webkit.org/b/218764,
which is that only the first wheel event in a gesture is cancelable.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
12:04 PM Changeset in webkit [270151] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Treat floats as soft wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=219235

Reviewed by Antti Koivisto.

While floats are not part of the inline content and they are not supposed to introduce soft wrap opportunities,
e.g. [text][float box][float box][text][float box][text] is essentially just [text][text][text]
figuring out whether a float (or set of floats) should stay on the line or not (and handle potentially out of order inline items)
brings in unnecessary complexity (and apparently Blink works like this too).

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::LineBuilder::nextWrapOpportunity const):

11:43 AM Changeset in webkit [270150] by Antti Koivisto
  • 8 edits in trunk

[LFC][Integration] Remove ensureLineBoxes call from RenderedPosition constructor
https://bugs.webkit.org/show_bug.cgi?id=219164

Reviewed by Zalan Bujtas.

Source/WebCore:

It is not needed anymore. We can use LFC line layout through the editing code.

  • dom/Position.cpp:

(WebCore::Position::ensureLineBoxes const): Deleted.

  • dom/Position.h:
  • editing/RenderedPosition.cpp:

(WebCore::RenderedPosition::RenderedPosition):

  • editing/RenderedPosition.h:

(WebCore::RenderedPosition::rootBox): Deleted.

LayoutTests:

  • accessibility/mac/attachment-element-replacement-character-expected.txt:
  • platform/ios/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt:
11:08 AM Changeset in webkit [270149] by BJ Burg
  • 7 edits in trunk

Web Inspector: implement Multimap.prototype.take()
https://bugs.webkit.org/show_bug.cgi?id=219231

Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • UserInterface/Base/Multimap.js:

(Multimap.prototype.take):

  • UserInterface/Base/Utilities.js:

(value):

LayoutTests:

  • inspector/unit-tests/multimap-expected.txt:
  • inspector/unit-tests/multimap.html:
  • inspector/unit-tests/set-utilities.html:
9:24 AM Changeset in webkit [270148] by Aditya Keerthi
  • 6 edits in trunk

Space between minute and meridiem fields in time inputs is too large
https://bugs.webkit.org/show_bug.cgi?id=219217
<rdar://problem/71637133>

Reviewed by Devin Rousso.

Source/WebCore:

The space between minute and meridiem fields in time inputs appears two
CSS pixels larger than a space character. This appearance is due to the
presence of a 1px padding on field elements, which exists to prevent
selected fields from appearing squished.

To fix, apply a negative margin on each side of the element that has a
space character. This pulls fields closer together and negates the
effect of the field padding on the appearance of the space.

  • html/shadow/DateTimeEditElement.cpp:

(WebCore::DateTimeEditBuilder::visitLiteral):

LayoutTests:

Rebaselined tests to match new appearance.

  • platform/mac-catalina/fast/forms/time/time-input-rendering-basic-expected.txt:
  • platform/mac-mojave/fast/forms/time/time-input-rendering-basic-expected.txt:
  • platform/mac-wk2/fast/forms/time/time-input-rendering-basic-expected.txt:
8:33 AM Changeset in webkit [270147] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] Use inline iterator in collectSelectionRects
https://bugs.webkit.org/show_bug.cgi?id=219233

Reviewed by Zalan Bujtas.

Convert these iOS only functions.

  • layout/integration/LayoutIntegrationLineIterator.h:

(WebCore::LayoutIntegration::PathLine::selectionHeight const):

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::PathRun::logicalTop const):
(WebCore::LayoutIntegration::PathRun::logicalBottom const):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::collectSelectionRects):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::collectSelectionRects):

  • rendering/RenderText.cpp:

(WebCore::RenderText::collectSelectionRects):

7:15 AM Changeset in webkit [270146] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] LayoutIntegration::Line::rect is way too ambiguous
https://bugs.webkit.org/show_bug.cgi?id=219230

Reviewed by Antti Koivisto.

Line::rect() is actually the line box (see https://www.w3.org/TR/css-inline-3/#line-box).

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::lineBoxTop const):
(WebCore::LayoutIntegration::Line::lineBoxBottom const):
(WebCore::LayoutIntegration::Line::lineBoxLeft const):
(WebCore::LayoutIntegration::Line::lineBoxRight const):
(WebCore::LayoutIntegration::Line::rect const): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::lineBoxTop const):
(WebCore::LayoutIntegration::LineIteratorModernPath::lineBoxBottom const):
(WebCore::LayoutIntegration::LineIteratorModernPath::contentLogicalLeft const):
(WebCore::LayoutIntegration::LineIteratorModernPath::logicalHeight const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::adjustForPagination):
(WebCore::LayoutIntegration::LineLayout::paint):

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::updateMinimumPageHeight):
(WebCore::LayoutIntegration::makeAdjustedContent):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::createTextRun const):

6:02 AM Changeset in webkit [270145] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC][Integration] Remove redundant lineBoxWidth from Line
https://bugs.webkit.org/show_bug.cgi?id=219208

Reviewed by Antti Koivisto.

Line::lineBoxWidth() is incorrectly returning the content logical width. By definition it is the available horizontal space
for the content and therefore it equals to Line::rect().width().

  1. Replace lineLogicalRect with lineBoxLogicalRect.
  2. Remove redundant lineBoxWidth() from Line.
  • display/css/DisplayBoxFactory.cpp:

(WebCore::Display::BoxFactory::displayBoxForTextRun const):

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedContentHeightAndMargin):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::InlineFormattingContext::Geometry::computedLineLogicalRect const): Deleted.

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::logicalRect const):
(WebCore::Layout::LineBox::logicalTopLeft const):
(WebCore::Layout::LineBox::logicalSize const):

  • layout/inlineformatting/InlineLineGeometry.h:

(WebCore::Layout::InlineLineGeometry::lineBoxLogicalRect const):
(WebCore::Layout::InlineLineGeometry::moveVertically):
(WebCore::Layout::InlineLineGeometry::InlineLineGeometry):
(WebCore::Layout::InlineLineGeometry::logicalRect const): Deleted.
(WebCore::Layout::InlineLineGeometry::lineBoxLogicalSize const): Deleted.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::lineOverflowWidth):
(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLineRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::rect const):
(WebCore::LayoutIntegration::Line::lineBoxWidth const): Deleted.

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

5:13 AM Changeset in webkit [270144] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Remove InlineLineGeometry::logicalLeft/top/bottom/right/width/height helper functions
https://bugs.webkit.org/show_bug.cgi?id=219226

Reviewed by Antti Koivisto.

This is in preparation for having lineBoxLogicalRect() on InlineLineGeometry. It makes it absolutely clear
of what type of logical rect we have here.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedContentHeightAndMargin):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

  • layout/inlineformatting/InlineLineGeometry.h:

(WebCore::Layout::InlineLineGeometry::logicalLeft const): Deleted.
(WebCore::Layout::InlineLineGeometry::logicalRight const): Deleted.
(WebCore::Layout::InlineLineGeometry::logicalTop const): Deleted.
(WebCore::Layout::InlineLineGeometry::logicalBottom const): Deleted.
(WebCore::Layout::InlineLineGeometry::logicalWidth const): Deleted.
(WebCore::Layout::InlineLineGeometry::logicalHeight const): Deleted.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLineRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

4:56 AM Changeset in webkit [270143] by Alan Bujtas
  • 11 edits in trunk/Source/WebCore

[LFC][Integration] Add contentLogicalOffset and contentLogicalWidth to InlineLineGeometry(Line)
https://bugs.webkit.org/show_bug.cgi?id=219220

Reviewed by Antti Koivisto.

This helps to match the legacy root inline box's geometry where
line left + content offset == root inline box left edge
line left + content offset + content width = root inline box right edge

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineLineGeometry.h:

(WebCore::Layout::InlineLineGeometry::contentOffset const):
(WebCore::Layout::InlineLineGeometry::contentWidth const):
(WebCore::Layout::InlineLineGeometry::InlineLineGeometry):
(WebCore::Layout::InlineLineGeometry::horizontalAlignmentOffset const): Deleted.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • layout/integration/LayoutIntegrationLine.h:

(WebCore::LayoutIntegration::Line::Line):
(WebCore::LayoutIntegration::Line::contentOffset const):
(WebCore::LayoutIntegration::Line::contentWidth const):
(WebCore::LayoutIntegration::Line::horizontalAlignmentOffset const): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::contentLogicalLeft const):
(WebCore::LayoutIntegration::LineIteratorModernPath::contentLogicalRight const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::makeAdjustedContent):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::createTextRun const):

12:11 AM Changeset in webkit [270142] by jiewen_tan@apple.com
  • 12 edits
    31 copies
    1 add in trunk

[WebAuthn] Implement SPI for AuthenticationServices.Framework
https://bugs.webkit.org/show_bug.cgi?id=218893
<rdar://problem/71364731>

Reviewed by Alex Christensen.

Source/WebCore:

Covered by API tests.

  • Modules/webauthn/PublicKeyCredentialCreationOptions.h:
  • Modules/webauthn/PublicKeyCredentialRequestOptions.h:

Tweaks some macros to expose an empty struct for ports that have WebAuthn disabled.

Source/WebKit:

This patch implements the SPI for AuthenticationServices.Framework, which is more or less a direct
translation of the WebAuthn Web IDLs and a thin wrapper on top of functionalities of the WebAuthn
process.

It deprecates the existing _WKWebAuthenticationPanel SPI which is for Safari to show UI only. This
patch does not just repurpose the SPI but also modifies some of the implementations. The most noticeable one
is the change of ownerships. Prior to this change, AuthenticatorManager owns the APIWebAuthenticationPanel.
Now, it's the opposite way.

Since there will be a period of time that the deprecated implementation will coexist with the new implementation,
this path also marks things that are meant to deprecate in the future to reduce confusions.

  • UIProcess/API/APIWebAuthenticationPanel.cpp:

(API::WebAuthenticationPanel::WebAuthenticationPanel):
(API::WebAuthenticationPanel::handleRequest):
(API::WebAuthenticationPanel::cancel const):

  • UIProcess/API/APIWebAuthenticationPanel.h:

Implements the plumbing for the new SPI and owns the AuthenticatorManager now.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(-[_WKAuthenticationExtensionsClientOutputs initWithAppid:]):
(-[_WKAuthenticatorResponse initWithRawId:extensions:]):
(-[_WKAuthenticatorAssertionResponse initWithRawId:extensions:authenticatorData:signature:userHandle:]):
(-[_WKAuthenticatorAttestationResponse initWithRawId:extensions:attestationObject:]):
(-[_WKAuthenticatorSelectionCriteria init]):
(-[_WKPublicKeyCredentialCreationOptions initWithRp:user:pubKeyCredParams:]):
(-[_WKPublicKeyCredentialDescriptor initWithType:identifier:]):
(-[_WKPublicKeyCredentialEntity initWithName:]):
(-[_WKPublicKeyCredentialParameters initWithType:alg:]):
(-[_WKPublicKeyCredentialRequestOptions init]):
(-[_WKPublicKeyCredentialRpEntity initWithName:]):
(-[_WKPublicKeyCredentialUserEntity initWithName:identifier:displayName:]):
(-[_WKWebAuthenticationPanel init]):
(vectorFromNSData):
(encodeEntity):
(publicKeyCredentialRpEntity):
(publicKeyCredentialUserEntity):
(publicKeyCredentialParameters):
(authenticatorTransport):
(authenticatorTransports):
(publicKeyCredentialDescriptors):
(authenticatorAttachment):
(userVerification):
(authenticatorSelectionCriteria):
(attestationConveyancePreference):
(authenticationExtensionsClientInputs):
(+[_WKWebAuthenticationPanel convertToCoreCreationOptionsWithOptions:]):
(wkAuthenticatorAttestationResponse):
(-[_WKWebAuthenticationPanel makeCredentialWithHash:options:completionHandler:]):
(+[_WKWebAuthenticationPanel convertToCoreRequestOptionsWithOptions:]):
(wkAuthenticatorAssertionResponse):
(-[_WKWebAuthenticationPanel getAssertionWithHash:options:completionHandler:]):
(+[_WKWebAuthenticationPanel isUserVerifyingPlatformAuthenticatorAvailable]):
Implements the SPI.

  • UIProcess/WebAuthentication/WebAuthenticationRequestData.h:

Marks things as to deprecate.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):
(): Deleted.

Nov 20, 2020:

5:45 PM Changeset in webkit [270141] by Chris Dumez
  • 6 edits
    4 adds in trunk

Poor resampling quality when using AudioContext sampleRate parameter
https://bugs.webkit.org/show_bug.cgi?id=219201

Reviewed by Geoff Garen.

Source/WebCore:

MultiChannelResampler uses a SincResampler per audio channel. In MultiChannelResampler::process(),
it was calling SincResampler::process() for each channel, which would potentially end up calling
MultiChannelResampler::ChannelProvider::provideInput() to provide channel data used for resampling.
The issue was that MultiChannelResampler::ChannelProvider::provideInput() is implemented in such
a way that things will break if provideInput() gets called more than once per channel. When using
an AudioContext's sample rate larger than the hardware sample rate, provideInput() was getting
called more than once per channel and this resulted in very poor resampling quality.

To address the issue, MultiChannelResampler::process() now processes the data in chunks that
are small enough to guarantee that MultiChannelResampler::ChannelProvider::provideInput() will
never get called more than once per audio channel.

The fix is based on the corresponding MultiChannelResampler / SincResampler implementation in
Chrome:

Tests: webaudio/audiocontext-large-samplerate.html

webaudio/audiocontext-low-samplerate.html

  • platform/audio/MultiChannelResampler.cpp:

(WebCore::MultiChannelResampler::ChannelProvider::setProvider):
(WebCore::MultiChannelResampler::ChannelProvider::setCurrentChannel):
(WebCore::MultiChannelResampler::process):

  • platform/audio/MultiChannelResampler.h:
  • platform/audio/SincResampler.cpp:

(WebCore::calculateChunkSize):
(WebCore::SincResampler::updateRegions):

  • platform/audio/SincResampler.h:

LayoutTests:

Add layout test coverage that would hit assertions in debug.

  • webaudio/audiocontext-large-samplerate-expected.txt: Added.
  • webaudio/audiocontext-large-samplerate.html: Added.
  • webaudio/audiocontext-low-samplerate-expected.txt: Added.
  • webaudio/audiocontext-low-samplerate.html: Added.
5:27 PM Changeset in webkit [270140] by Dewei Zhu
  • 2 edits in trunk/Websites/perf.webkit.org

'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.
https://bugs.webkit.org/show_bug.cgi?id=219116

Reviewed by Ryosuke Niwa.

Anlyzing charts and schedule retries for A/B tests on run-analysis script are independent task.
It should not skip scheduling retries even when chart analysis part fails.

  • tools/run-analysis.js:

(async analysisLoop): Change the logic so that chart analysis failure will not stop scheduling retries.
Fix a typo for 'notificationRemoteAPI'.

5:11 PM Changeset in webkit [270139] by Chris Dumez
  • 2 edits in trunk/LayoutTests

(r267253) [ Mac ] webaudio/AudioParam/audioparam-processing.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=219228
<rdar://problem/71643007>

Reviewed by Geoffrey Garen.

The test was running subtests in parallel using Promise.all(), causing the output
lines to sometimes be out of order. We now enforce the ordering of the subtests
to make sure that the output is consistent.

  • webaudio/AudioParam/audioparam-processing.html:
4:51 PM Changeset in webkit [270138] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Fix a bug that platform groups cannot be updated on 'admin/platform'.
https://bugs.webkit.org/show_bug.cgi?id=219118

Reviewed by Ryosuke Niwa.

Admins should be able to update platform group on 'admin/platform'.
Update the assertion on BuildbotTriggerable._pullBuildbotOnAllSyncers so that when there is no
corresponding entry in buildRequestByGroup, the test group for the request should be finished.

  • public/admin/platforms.php:
  • tools/js/buildbot-triggerable.js: Updated the assert statement.

(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):

4:51 PM Changeset in webkit [270137] by achristensen@apple.com
  • 2 edits in trunk/LayoutTests

Silence ApplicationCache related errors when running http/tests/inspector/network/x-frame-options.html
https://bugs.webkit.org/show_bug.cgi?id=218830

  • http/tests/inspector/network/x-frame-options.html:

This makes the test output deterministic, even after trying to message a frame that has been destroyed.
The actual fix was the revision referred to in the bugzilla, but this was needed to make the test not print out mostly-unrelated errors.

4:38 PM Changeset in webkit [270136] by Kate Cheney
  • 56 edits
    2 copies
    2 adds in trunk

PCM: Persist pending ad clicks and attributions so they can survive browser restart
https://bugs.webkit.org/show_bug.cgi?id=219134
<rdar://problem/70470129>

Reviewed by John Wilander.
Source/WebCore:

This patch migrates PCM data to be stored on disk and
updates naming of various PCM data to match naming agreed
upon in standards bodies:

  • source -> sourceSite
  • campaign/campaignID -> sourceID
  • destination -> attributeOnSite
  • conversion/conversionValue -> attributionTriggerData
  • unconverted -> unattributed
  • convert(ed) -> attribute(d)

Tests: http/tests/privateClickMeasurement/expired-ad-click-gets-removed-on-session-start.html

http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::maxAge):
(WebCore::PrivateClickMeasurement::isValid const):
(WebCore::PrivateClickMeasurement::parseAttributionRequest):
(WebCore::PrivateClickMeasurement::attributeAndGetEarliestTimeToSend):
(WebCore::PrivateClickMeasurement::hasHigherPriorityThan const):
(WebCore::PrivateClickMeasurement::reportURL const):
(WebCore::PrivateClickMeasurement::json const):
(WebCore::PrivateClickMeasurement::parseConversionRequest): Deleted.
(WebCore::PrivateClickMeasurement::convertAndGetEarliestTimeToSend): Deleted.
Renaming.

(WebCore::PrivateClickMeasurement::markAsExpired): Deleted.
(WebCore::PrivateClickMeasurement::hasExpired const): Deleted.
(WebCore::PrivateClickMeasurement::markConversionAsSent): Deleted.
(WebCore::PrivateClickMeasurement::wasConversionSent const): Deleted.
We can remove the *Expired() functions as they were only indicators
for the HashMap storage to know what attributions to delete. This is
now handled by SQLite. Similarly, we can remove the markConversionAsSent
and wasConversionSent functions because a sent attribution will not
be stored in the database, so this value will always be false.

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

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::SourceID::SourceID):
(WebCore::PrivateClickMeasurement::SourceSite::SourceSite):
(WebCore::PrivateClickMeasurement::SourceSite::operator== const):
(WebCore::PrivateClickMeasurement::SourceSite::deletedValue):
(WebCore::PrivateClickMeasurement::SourceSite::constructDeletedValue):
(WebCore::PrivateClickMeasurement::SourceSiteHash::hash):
(WebCore::PrivateClickMeasurement::SourceSiteHash::equal):
(WebCore::PrivateClickMeasurement::AttributeOnSite::AttributeOnSite):
(WebCore::PrivateClickMeasurement::AttributeOnSite::operator== const):
(WebCore::PrivateClickMeasurement::AttributeOnSite::deletedValue):
(WebCore::PrivateClickMeasurement::AttributeOnSite::constructDeletedValue):
(WebCore::PrivateClickMeasurement::AttributeOnSiteHash::hash):
(WebCore::PrivateClickMeasurement::AttributeOnSiteHash::equal):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::AttributionTriggerData):
Renaming.

(WebCore::PrivateClickMeasurement::PrivateClickMeasurement):
(WebCore::PrivateClickMeasurement::sourceSite const):
(WebCore::PrivateClickMeasurement::attributeOnSite const):
(WebCore::PrivateClickMeasurement::timeOfAdClick const):
(WebCore::PrivateClickMeasurement::setEarliestTimeToSend):
(WebCore::PrivateClickMeasurement::sourceID):
(WebCore::PrivateClickMeasurement::attributionTriggerData):
(WebCore::PrivateClickMeasurement::setAttribution):
Now that we store data on disk, we need a more flexible constructor
and more functions to rebuild PCM objects from the database.

(WebCore::PrivateClickMeasurement::encode const):
(WebCore::PrivateClickMeasurement::decode):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::encode const):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::decode):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::SourceSite>::emptyValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::SourceSite>::constructDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::SourceSite>::isDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributeOnSite>::emptyValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributeOnSite>::constructDeletedValue):
(WTF::HashTraits<WebCore::PrivateClickMeasurement::AttributeOnSite>::isDeletedValue):
(WebCore::PrivateClickMeasurement::Campaign::Campaign): Deleted.
(WebCore::PrivateClickMeasurement::Campaign::isValid const): Deleted.
(WebCore::PrivateClickMeasurement::Source::Source): Deleted.
(WebCore::PrivateClickMeasurement::Source::operator== const): Deleted.
(WebCore::PrivateClickMeasurement::Source::matches const): Deleted.
(WebCore::PrivateClickMeasurement::Source::isHashTableDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::Source::deletedValue): Deleted.
(WebCore::PrivateClickMeasurement::Source::constructDeletedValue): Deleted.
(WebCore::PrivateClickMeasurement::Source::deleteValue): Deleted.
(WebCore::PrivateClickMeasurement::Source::isDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::SourceHash::hash): Deleted.
(WebCore::PrivateClickMeasurement::SourceHash::equal): Deleted.
(WebCore::PrivateClickMeasurement::Destination::Destination): Deleted.
(WebCore::PrivateClickMeasurement::Destination::operator== const): Deleted.
(WebCore::PrivateClickMeasurement::Destination::matches const): Deleted.
(WebCore::PrivateClickMeasurement::Destination::isHashTableDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::Destination::deletedValue): Deleted.
(WebCore::PrivateClickMeasurement::Destination::constructDeletedValue): Deleted.
(WebCore::PrivateClickMeasurement::Destination::deleteValue): Deleted.
(WebCore::PrivateClickMeasurement::Destination::isDeletedValue const): Deleted.
(WebCore::PrivateClickMeasurement::DestinationHash::hash): Deleted.
(WebCore::PrivateClickMeasurement::DestinationHash::equal): Deleted.
(WebCore::PrivateClickMeasurement::Conversion::Conversion): Deleted.
(WebCore::PrivateClickMeasurement::Conversion::isValid const): Deleted.
(WebCore::PrivateClickMeasurement::source const): Deleted.
(WebCore::PrivateClickMeasurement::destination const): Deleted.
Renaming.

(WebCore::PrivateClickMeasurement::isEmpty const): Deleted.
Not needed anymore, the database uses Optionals to indicate an empty result.

(WebCore::PrivateClickMeasurement::Conversion::encode const): Deleted.
(WebCore::PrivateClickMeasurement::Conversion::decode): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::Source>::emptyValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::Source>::constructDeletedValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::Source>::isDeletedValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::Destination>::emptyValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::Destination>::constructDeletedValue): Deleted.
(WTF::HashTraits<WebCore::PrivateClickMeasurement::Destination>::isDeletedValue): Deleted.
Renaming.

Source/WebKit:

This patch migrates Private Click Measurement to use SQLite,
which is beneficial because it requires less in-memory storage and
persists PCM data across browser sessions. It also updates naming
to match naming agreed upon in standards bodies:

  • source -> sourceSite
  • campaign/campaignID -> sourceID
  • destination -> attributeOnSite
  • conversion/conversionValue -> attributionTriggerData
  • unconverted -> unattributed
  • convert(ed) -> attribute(d)

This adds 3 SQLite tables: one for clicks that haven't been
attributed, one for attributions that haven't been sent, and one to
store the last time the reports were sent to make sure reports get
sent as soon as possible if needed after a browser restart.

Behavior is identical to existing PCM implementation with the addition
of persistence. Existing PCM tests confirm no regressions.

Reviewed by John Wilander.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::createTableQueries):
(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::createUniqueIndices):
(WebKit::ResourceLoadStatisticsDatabaseStore::createSchema):
(WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements):
New queries to interact with PCM data.

(WebKit::ResourceLoadStatisticsDatabaseStore::updateTimerLastFired):
(WebKit::ResourceLoadStatisticsDatabaseStore::timerLastFired):
(WebKit::ResourceLoadStatisticsDatabaseStore::updatePrivateClickMeasurementAttributionTimes):
Set earliestTimeToSend to be the original value minus the time passed since the last timer fire
for each entry. If the result is less than 0, set to 0 so the report gets sent immediately.

(WebKit::ResourceLoadStatisticsDatabaseStore::buildPrivateClickMeasurementFromDatabase):
Creates a PCM object from data in the database.

(WebKit::ResourceLoadStatisticsDatabaseStore::findPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting):
(WebKit::ResourceLoadStatisticsDatabaseStore::removeUnattributed):
(WebKit::ResourceLoadStatisticsDatabaseStore::attributePrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearExpiredPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString):
(WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearSentAttributions):
These functions use database queries to implement PCM functionality with exactly the same
behavior as the in-memory PCM implementation.

(WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::updateTimerLastFired):
(WebKit::WebResourceLoadStatisticsStore::insertPrivateClickMeasurement):
(WebKit::WebResourceLoadStatisticsStore::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting):
(WebKit::WebResourceLoadStatisticsStore::attributePrivateClickMeasurement):
(WebKit::WebResourceLoadStatisticsStore::allAttributedPrivateClickMeasurement):
(WebKit::WebResourceLoadStatisticsStore::clearPrivateClickMeasurement):
(WebKit::WebResourceLoadStatisticsStore::clearPrivateClickMeasurementForRegistrableDomain):
(WebKit::WebResourceLoadStatisticsStore::clearExpiredPrivateClickMeasurement):
(WebKit::WebResourceLoadStatisticsStore::privateClickMeasurementToString):
(WebKit::WebResourceLoadStatisticsStore::clearSentAttributions):
(WebKit::WebResourceLoadStatisticsStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::firePrivateClickMeasurementTimerImmediately):
(WebKit::NetworkProcess::simulateResourceLoadStatisticsSessionRestart):
(WebKit::NetworkProcess::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
Test functions to help simulate a browser restart after PCM data has expired during
a session close. This is the only behavior change from the existing PCM implementation.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::firePrivateClickMeasurementTimerImmediately):
(WebKit::NetworkSession::storePrivateClickMeasurement):
(WebKit::NetworkSession::handlePrivateClickMeasurementConversion):
(WebKit::NetworkSession::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::NetworkSession::markPrivateClickMeasurementsAsExpiredForTesting):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::PrivateClickMeasurementManager):
Move constructor to cpp file to call startTimer(5_s) which will kick
off sending any reports that have expired in the database. We should
wait 5 seconds so we are sure ITP is up and running.

(WebKit::PrivateClickMeasurementManager::storeUnattributed):
(WebKit::PrivateClickMeasurementManager::handleAttribution):
(WebKit::PrivateClickMeasurementManager::startTimer):
(WebKit::PrivateClickMeasurementManager::attribute):
(WebKit::PrivateClickMeasurementManager::fireConversionRequest):
(WebKit::PrivateClickMeasurementManager::clearSentAttributions):
(WebKit::PrivateClickMeasurementManager::updateTimerLastFired):
(WebKit::PrivateClickMeasurementManager::firePendingAttributionRequests):
(WebKit::PrivateClickMeasurementManager::clear):
(WebKit::PrivateClickMeasurementManager::clearForRegistrableDomain):
(WebKit::PrivateClickMeasurementManager::clearExpired):
(WebKit::PrivateClickMeasurementManager::toString const):
(WebKit::PrivateClickMeasurementManager::setConversionURLForTesting):
(WebKit::PrivateClickMeasurementManager::markAllUnattributedAsExpiredForTesting):
(WebKit::PrivateClickMeasurementManager::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::PrivateClickMeasurementManager::storeUnconverted): Deleted.
(WebKit::PrivateClickMeasurementManager::handleConversion): Deleted.
(WebKit::PrivateClickMeasurementManager::convert): Deleted.
(WebKit::PrivateClickMeasurementManager::firePendingConversionRequests): Deleted.
(WebKit::PrivateClickMeasurementManager::markAllUnconvertedAsExpiredForTesting): Deleted.
Implementation moved to ResourceLoadStatisticsDatabaseStore.

  • NetworkProcess/PrivateClickMeasurementManager.h:

(WebKit::PrivateClickMeasurementManager::PrivateClickMeasurementManager): Deleted.
Moved to cpp file.

(WebKit::PrivateClickMeasurementManager::m_sessionID): Deleted.

  • UIProcess/API/C/WKPage.cpp:

(WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WKPageSimulateResourceLoadStatisticsSessionRestart):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::WebPageProxy::simulateResourceLoadStatisticsSessionRestart):

  • UIProcess/WebPageProxy.h:

Testing support.

Tools:

Add support for testing of expired ad-clicks and attributions.
Update names after Private Click Measurement standards discussions.

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

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

(WTR::TestRunner::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WTR::TestRunner::simulateResourceLoadStatisticsSessionRestart):

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

(WTR::TestController::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WTR::TestController::simulateResourceLoadStatisticsSessionRestart):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Added layout test coverage. Removed 'Conversion request sent:'
category in the toString() method because it will always be false.
Sent conversions are purged from the database, so it is not a useful
piece of information to report. Updated naming based on standards
coversations.

  • http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html:
  • http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session-expected.txt:
  • http/tests/privateClickMeasurement/expired-ad-click-gets-removed-on-session-start-expected.txt: Added.
  • http/tests/privateClickMeasurement/expired-ad-click-gets-removed-on-session-start.html: Copied from LayoutTests/http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html.
  • http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start-expected.txt: Added.
  • http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start.html: Copied from LayoutTests/http/tests/privateClickMeasurement/send-attribution-conversion-request.html.
  • http/tests/privateClickMeasurement/resources/conversionReport.php:
  • http/tests/privateClickMeasurement/resources/getConversionData.php:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html:
  • http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html:
  • http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html:
  • http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt:
  • http/tests/privateClickMeasurement/send-attribution-conversion-request.html:
  • http/tests/privateClickMeasurement/store-private-click-measurement-expected.txt:
3:03 PM Changeset in webkit [270135] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Assign top/left to LineBox
https://bugs.webkit.org/show_bug.cgi?id=219218

Reviewed by Antti Koivisto.

It makes the LineBox class more aligned with the spec (https://www.w3.org/TR/css-inline-3/#line-box).

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::InlineFormattingContext::Geometry::computedLineLogicalRect const):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::logicalWidth const):
(WebCore::Layout::LineBox::logicalHeight const):
(WebCore::Layout::LineBox::logicalTopLeft const):
(WebCore::Layout::LineBox::logicalSize const):
(WebCore::Layout::LineBox::setLogicalHeight):

2:37 PM Changeset in webkit [270134] by Devin Rousso
  • 81 edits in trunk/Source/WebInspectorUI

Web Inspector: drop shown/hidden in favor of attached/detached
https://bugs.webkit.org/show_bug.cgi?id=218678

Reviewed by Brian Burg.

  • UserInterface/Views/View.js:

(WI.View.prototype.removeSubview):
Ensure that detached is called before the node is removed from the DOM so that any state
currently held in the DOM can be recorded (e.g. scroll position).

  • UserInterface/Views/ContentBrowserTabContentView.js:

(WI.ContentBrowserTabContentView.prototype.attached):
(WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
(WI.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
(WI.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
(WI.ContentBrowserTabContentView.prototype._detailsSidebarCollapsedStateDidChange):
(WI.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):
(WI.ContentBrowserTabContentView.prototype.shown): Deleted.
(WI.ContentBrowserTabContentView.prototype.hidden): Deleted.

  • UserInterface/Views/SingleSidebar.js:

(WI.SingleSidebar.prototype.willSetSelectedSidebarPanel):
(WI.SingleSidebar.prototype.didSetSelectedSidebarPanel):
(WI.SingleSidebar.prototype.didSetCollapsed):
Ensure that any state modifications happen before adding/removing the selected sidebar panel
to/from the DOM so that it (and the previously selected sidebar panel) doesn't re-layout
multiple times.

  • UserInterface/Views/ConsoleDrawer.js:

(WI.ConsoleDrawer.prototype.set collapsed):
(WI.ConsoleDrawer.prototype.attached): Added.
(WI.ConsoleDrawer.prototype.shown): Deleted.
Add special logic in collapsed since this is never removed from the DOM.

  • UserInterface/Views/ConsoleTabContentView.js:

(WI.ConsoleTabContentView):
(WI.ConsoleTabContentView.prototype.attached): Added.
(WI.ConsoleTabContentView.prototype.detached): Added.
(WI.ConsoleTabContentView.prototype.shown): Deleted.
Remember whether the split console was expanded before the Console Tab is shown and restore
that state after the Console Tab is hidden.

  • UserInterface/Views/TimelineOverview.js:

(WI.TimelineOverview.prototype.get height):
(WI.TimelineOverview.prototype.attached):
(WI.TimelineOverview.prototype.detached):
(WI.TimelineOverview.prototype.recordWasFiltered):
(WI.TimelineOverview.prototype.selectRecord):
(WI.TimelineOverview.prototype.updateLayoutIfNeeded):
(WI.TimelineOverview.prototype.layout):
(WI.TimelineOverview.prototype._instrumentAdded):
(WI.TimelineOverview.prototype._timelineRulerMouseClicked):
(WI.TimelineOverview.prototype._viewModeDidChange):
(WI.TimelineOverview.prototype.get visible): Deleted.
(WI.TimelineOverview.prototype.shown): Deleted.
(WI.TimelineOverview.prototype.hidden): Deleted.

  • UserInterface/Views/TimelineOverviewGraph.js:

(WI.TimelineOverviewGraph):
(WI.TimelineOverviewGraph.prototype.get hidden):
(WI.TimelineOverviewGraph.prototype.set hidden):
(WI.TimelineOverviewGraph.prototype.needsLayout):
(WI.TimelineOverviewGraph.prototype.get visible): Deleted.
(WI.TimelineOverviewGraph.prototype.shown): Deleted.
(WI.TimelineOverviewGraph.prototype.hidden): Deleted.

  • UserInterface/Views/CPUTimelineOverviewGraph.js:

(WI.CPUTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:

(WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/LayoutTimelineOverviewGraph.js:

(WI.LayoutTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/MediaTimelineOverviewGraph.js:

(WI.MediaTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/MemoryTimelineOverviewGraph.js:

(WI.MemoryTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/NetworkTimelineOverviewGraph.js:

(WI.NetworkTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:

(WI.RenderingFrameTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/ScriptTimelineOverviewGraph.js:

(WI.ScriptTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/TimelineView.js:

(WI.TimelineView.prototype.needsLayout): Deleted.
Add a special hidden instead of the previously inherited visible so that the existing
logic for editing timeline instruments stays (mostly) the same.

  • UserInterface/Views/ApplicationCacheFrameContentView.js:

(WI.ApplicationCacheFrameContentView):
(WI.ApplicationCacheFrameContentView.prototype.attached):
(WI.ApplicationCacheFrameContentView.prototype.detached):
(WI.ApplicationCacheFrameContentView.prototype.layout):
(WI.ApplicationCacheFrameContentView.prototype.updateStatus):
(WI.ApplicationCacheFrameContentView.prototype.shown): Deleted.
(WI.ApplicationCacheFrameContentView.prototype.closed): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._maybeUpdate): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._markDirty): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._updateStatus): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._update): Deleted.
No need to maintain a separate "dirty" flag based on visibility since attached/detached
are called whenever the view is added/removed to/from the DOM.

  • UserInterface/Debug/DebugContentView.js:

(WI.DebugContentView.prototype.attached): Added.
(WI.DebugContentView.prototype.detached): Added.
(WI.DebugContentView.prototype.shown): Deleted.
(WI.DebugContentView.prototype.hidden): Deleted.

  • UserInterface/Views/AnimationDetailsSidebarPanel.js:

(WI.AnimationDetailsSidebarPanel.prototype.attached): Added.
(WI.AnimationDetailsSidebarPanel.prototype.shown): Deleted.

  • UserInterface/Views/AuditTabContentView.js:

(WI.AuditTabContentView.prototype.attached): Added.
(WI.AuditTabContentView.prototype.detached): Added.
(WI.AuditTabContentView.prototype.shown): Deleted.
(WI.AuditTabContentView.prototype.hidden): Deleted.

  • UserInterface/Views/AuditTestContentView.js:

(WI.AuditTestContentView.prototype.attached): Added.
(WI.AuditTestContentView.prototype.detached): Added.
(WI.AuditTestContentView.prototype.shown): Deleted.
(WI.AuditTestContentView.prototype.hidden): Deleted.

  • UserInterface/Views/CPUTimelineView.js:

(WI.CPUTimelineView.prototype.attached): Added.
(WI.CPUTimelineView.prototype.shown): Deleted.

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel.prototype.attached): Added.
(WI.CanvasSidebarPanel.prototype.detached): Added.
(WI.CanvasSidebarPanel.prototype.shown): Deleted.
(WI.CanvasSidebarPanel.prototype.hidden): Deleted.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.attached):
(WI.DOMTreeContentView.prototype.detached):
(WI.DOMTreeContentView.prototype.shown): Deleted.
(WI.DOMTreeContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ElementsTabContentView.js:

(WI.ElementsTabContentView.prototype.attached):
(WI.ElementsTabContentView.prototype.shown): Deleted.

  • UserInterface/Views/FontResourceContentView.js:

(WI.FontResourceContentView.prototype.attached):
(WI.FontResourceContentView.prototype.detached):
(WI.FontResourceContentView.prototype.shown): Deleted.
(WI.FontResourceContentView.prototype.hidden): Deleted.

  • UserInterface/Views/HeapSnapshotClusterContentView.js:

(WI.HeapSnapshotClusterContentView.prototype.attached): Added.
(WI.HeapSnapshotClusterContentView.prototype.shown): Deleted.

  • UserInterface/Views/HeapSnapshotContentView.js:

(WI.HeapSnapshotContentView.prototype.attached): Added.
(WI.HeapSnapshotContentView.prototype.detached): Added.
(WI.HeapSnapshotContentView.prototype.shown): Deleted.
(WI.HeapSnapshotContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ImageResourceContentView.js:

(WI.ImageResourceContentView.prototype.attached): Added.
(WI.ImageResourceContentView.prototype.detached): Added.
(WI.ImageResourceContentView.prototype.shown): Deleted.
(WI.ImageResourceContentView.prototype.hidden): Deleted.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WI.LayerTreeDetailsSidebarPanel.prototype.attached):
(WI.LayerTreeDetailsSidebarPanel.prototype.detached): Added.
(WI.LayerTreeDetailsSidebarPanel.prototype.shown): Deleted.
(WI.LayerTreeDetailsSidebarPanel.prototype.hidden): Deleted.

  • UserInterface/Views/Layers3DContentView.js:

(WI.Layers3DContentView.prototype.attached): Added.
(WI.Layers3DContentView.prototype.detached): Added.
(WI.Layers3DContentView.prototype.shown): Deleted.
(WI.Layers3DContentView.prototype.hidden): Deleted.

  • UserInterface/Views/LayersTabContentView.js:

(WI.LayersTabContentView.prototype.attached): Added.
(WI.LayersTabContentView.prototype.shown): Deleted.

  • UserInterface/Views/LayoutTimelineView.js:

(WI.LayoutTimelineView.prototype.attached): Added.
(WI.LayoutTimelineView.prototype.detached): Added.
(WI.LayoutTimelineView.prototype.shown): Deleted.
(WI.LayoutTimelineView.prototype.hidden): Deleted.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.attached): Added.
(WI.LogContentView.prototype.showCustomFindBanner):
(WI.LogContentView.prototype.get supportsSave):
(WI.LogContentView.prototype.shown): Deleted.

  • UserInterface/Views/MemoryTimelineView.js:

(WI.MemoryTimelineView.prototype.attached): Added.
(WI.MemoryTimelineView.prototype.shown): Deleted.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.attached): Added.
(WI.NavigationSidebarPanel.prototype.shown): Deleted.

  • UserInterface/Views/NetworkDetailView.js:

(WI.NetworkDetailView.prototype.attached): Added.
(WI.NetworkDetailView.prototype.shown): Deleted.
(WI.NetworkDetailView.prototype.hidden): Deleted.

  • UserInterface/Views/NetworkResourceDetailView.js:

(WI.NetworkResourceDetailView.prototype.attached): Added.
(WI.NetworkResourceDetailView.prototype.shown): Deleted.

  • UserInterface/Views/OverviewTimelineView.js:

(WI.OverviewTimelineView.prototype.attached): Added.
(WI.OverviewTimelineView.prototype.shown): Deleted.

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView.prototype.attached): Added.
(WI.RecordingContentView.prototype.detached): Added.
(WI.RecordingContentView.prototype.shown): Deleted.
(WI.RecordingContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView.prototype.attached): Added.
(WI.ResourceClusterContentView.prototype.shown): Deleted.

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype.detached): Added.
(WI.ResourceHeadersContentView.prototype.hidden): Deleted.

  • UserInterface/Views/SearchTabContentView.js:

(WI.SearchTabContentView.prototype.attached): Added.
(WI.SearchTabContentView.prototype.shown): Deleted.

  • UserInterface/Views/ShaderProgramContentView.js:

(WI.ShaderProgramContentView.prototype.attached): Added.
(WI.ShaderProgramContentView.prototype.shown): Deleted.
(WI.ShaderProgramContentView.prototype.hidden): Deleted.

  • UserInterface/Views/SidebarPanel.js:

(WI.SidebarPanel.prototype.attached): Added.
(WI.SidebarPanel.prototype.detached): Added.
(WI.SidebarPanel.prototype.shown): Deleted.
(WI.SidebarPanel.prototype.hidden): Deleted.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.attached): Added.
(WI.SourceCodeTextEditor.prototype.detached): Added.
(WI.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WI.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
(WI.SourceCodeTextEditor.prototype.shown): Deleted.
(WI.SourceCodeTextEditor.prototype.hidden): Deleted.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden): Deleted.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.detached):
(WI.SpreadsheetStyleProperty.prototype.hidden): Deleted.

  • UserInterface/Views/StyleDetailsPanel.js:

(WI.StyleDetailsPanel):
(WI.StyleDetailsPanel.prototype.attached):
(WI.StyleDetailsPanel.prototype.markAsNeedsRefresh):
(WI.StyleDetailsPanel.prototype.nodeStylesRefreshed):
(WI.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
(WI.StyleDetailsPanel.prototype.shown): Deleted.
(WI.StyleDetailsPanel.prototype.hidden): Deleted.

  • UserInterface/Views/TabContentView.js:

(WI.TabContentView.prototype.attached): Added.
(WI.TabContentView.prototype.restoreStateFromCookie):
(WI.TabContentView.prototype.shown): Deleted.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.attached): Added.
(WI.Table.prototype.restoreScrollPosition): Deleted.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.attached): Added.
(WI.TextEditor.prototype.layout):
(WI.TextEditor.prototype._revealPendingPositionIfPossible):
(WI.TextEditor.prototype.get visible): Deleted.
(WI.TextEditor.prototype.shown): Deleted.
(WI.TextEditor.prototype.hidden): Deleted.

  • UserInterface/Views/TimelineDataGrid.js:

(WI.TimelineDataGrid.prototype.detached): Added.
(WI.TimelineDataGrid.prototype.shown): Deleted.
(WI.TimelineDataGrid.prototype.hidden): Deleted.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView.prototype.attached): Added.
(WI.TimelineRecordingContentView.prototype.detached): Added.
(WI.TimelineRecordingContentView.prototype.initialLayout): Added.
(WI.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WI.TimelineRecordingContentView.prototype._update):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewRecordSelected):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerShow):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerHide):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange):
(WI.TimelineRecordingContentView.prototype.shown): Deleted.
(WI.TimelineRecordingContentView.prototype.hidden): Deleted.

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView.prototype.attached): Added.
(WI.TimelineTabContentView.prototype.detached): Added.
(WI.TimelineTabContentView.prototype._inspectorVisibilityChanged):
(WI.TimelineTabContentView.prototype.shown): Deleted.
(WI.TimelineTabContentView.prototype.hidden): Deleted.

  • UserInterface/Views/WebSocketContentView.js:

(WI.WebSocketContentView.prototype.attached): Added.
(WI.WebSocketContentView.prototype.detached): Added.
(WI.WebSocketContentView.prototype.shown): Deleted.
(WI.WebSocketContentView.prototype.hidden): Deleted.

  • UserInterface/Controllers/JavaScriptLogViewController.js:

(WI.JavaScriptLogViewController.prototype._appendConsoleMessageView):
Move logic inside shown/hidden to attached/detached.
Use isAttached instead of visible.

  • UserInterface/Models/BackForwardEntry.js:

(WI.BackForwardEntry.prototype.prepareToShow):
(WI.BackForwardEntry.prototype.prepareToHide):

  • UserInterface/Views/AuditTestGroupContentView.js:

(WI.AuditTestGroupContentView.prototype.attached): Added.
(WI.AuditTestGroupContentView.prototype.detached): Added.
(WI.AuditTestGroupContentView.prototype._addTest):
(WI.AuditTestGroupContentView.prototype._handleTestGroupTestRemoved):
(WI.AuditTestGroupContentView.prototype.shown): Deleted.
(WI.AuditTestGroupContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ChangesDetailsSidebarPanel.js:

(WI.ChangesDetailsSidebarPanel.prototype.shown): Deleted.

  • UserInterface/Views/ClusterContentView.js:

(WI.ClusterContentView.prototype.shown): Deleted.
(WI.ClusterContentView.prototype.hidden): Deleted.

  • UserInterface/Views/CollectionContentView.js:

(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.shown): Deleted.
(WI.CollectionContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ComputedStyleSection.js:

(WI.ComputedStyleSection.prototype.hidden): Deleted.

  • UserInterface/Views/ContentBrowser.js:

(WI.ContentBrowser.prototype.attached): Added.
(WI.ContentBrowser.prototype.shown): Deleted.
(WI.ContentBrowser.prototype.hidden): Deleted.

  • UserInterface/Views/ContentView.js:

(WI.ContentView.prototype.get visible): Deleted.
(WI.ContentView.prototype.set visible): Deleted.
(WI.ContentView.prototype.shown): Deleted.
(WI.ContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ContentViewContainer.js:

(WI.ContentViewContainer.prototype.showContentView):
(WI.ContentViewContainer.prototype.showBackForwardEntryForIndex):
(WI.ContentViewContainer.prototype.replaceContentView):
(WI.ContentViewContainer.prototype.closeContentView):
(WI.ContentViewContainer.prototype.attached): Added.
(WI.ContentViewContainer.prototype.detached): Added.
(WI.ContentViewContainer.prototype._disassociateFromContentView):
(WI.ContentViewContainer.prototype._showEntry):
(WI.ContentViewContainer.prototype.shown): Deleted.
(WI.ContentViewContainer.prototype.hidden): Deleted.

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:

(WI.GeneralStyleDetailsSidebarPanel.prototype.get minimumWidth):
(WI.GeneralStyleDetailsSidebarPanel.prototype.attached): Added.
(WI.GeneralStyleDetailsSidebarPanel.prototype._showPanel):
(WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Deleted.
(WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Deleted.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WI.HeapAllocationsTimelineView.prototype.shown): Deleted.
(WI.HeapAllocationsTimelineView.prototype.hidden): Deleted.

  • UserInterface/Views/MediaTimelineView.js:

(WI.MediaTimelineView.prototype.shown): Deleted.
(WI.MediaTimelineView.prototype.hidden): Deleted.

  • UserInterface/Views/NetworkTabContentView.js:

(WI.NetworkTabContentView.prototype.shown): Deleted.
(WI.NetworkTabContentView.prototype.hidden): Deleted.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.detached): Added.
(WI.NetworkTableContentView.prototype._hideDetailView):
(WI.NetworkTableContentView.prototype._showDetailView):
(WI.NetworkTableContentView.prototype.shown): Deleted.
(WI.NetworkTableContentView.prototype.hidden): Deleted.

  • UserInterface/Views/NetworkTimelineView.js:

(WI.NetworkTimelineView.prototype.shown): Deleted.
(WI.NetworkTimelineView.prototype.hidden): Deleted.

  • UserInterface/Views/RenderingFrameTimelineView.js:

(WI.RenderingFrameTimelineView.prototype.shown): Deleted.
(WI.RenderingFrameTimelineView.prototype.hidden): Deleted.

  • UserInterface/Views/ScriptContentView.js:

(WI.ScriptContentView.prototype.shown): Deleted.
(WI.ScriptContentView.prototype.hidden): Deleted.

  • UserInterface/Views/ScriptDetailsTimelineView.js:

(WI.ScriptDetailsTimelineView.prototype.shown): Deleted.
(WI.ScriptDetailsTimelineView.prototype.hidden): Deleted.

  • UserInterface/Views/Sidebar.js:

(WI.Sidebar.prototype.set collapsed):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden): Deleted.

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden): Deleted.

  • UserInterface/Views/TextContentView.js:

(WI.TextContentView.prototype.shown): Deleted.
(WI.TextContentView.prototype.hidden): Deleted.

  • UserInterface/Views/TextResourceContentView.js:

(WI.TextResourceContentView.prototype.shown): Deleted.
(WI.TextResourceContentView.prototype.hidden): Deleted.
Remove shown/hidden calls since that state is propagated to subviews by WI.View logic.

2:29 PM Changeset in webkit [270133] by Lauro Moura
  • 9 edits
    3 copies
    3 moves
    1 delete in trunk/LayoutTests

[GTK][WPE] Rebaseline and gardening

Unreviewed test gardening.

The meter and progress tests had to be rebaselined and split after
r270044.

  • platform/glib/TestExpectations: Add missing entries.
  • platform/glib/fast/dom/HTMLProgressElement/progress-element-expected.txt:
  • platform/glib/webaudio/BiquadFilter/tail-time-peaking-expected.txt:

Removed. Uneeded after r269972.

  • platform/glib/webaudio/audioworklet-addModule-failure-expected.txt:

Rebaseline after r270033.

  • platform/gtk/fast/dom/HTMLMeterElement/meter-element-expected.txt: Copied from LayoutTests/platform/glib/fast/dom/HTMLMeterElement/meter-element-expected.txt.
  • platform/gtk/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt: Copied from LayoutTests/platform/glib/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt.
  • platform/gtk/fast/dom/HTMLMeterElement/meter-styles-expected.txt: Copied from LayoutTests/platform/glib/fast/dom/HTMLMeterElement/meter-styles-expected.txt.
  • platform/gtk/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Rebaselined after r270023.

  • platform/glib/TestExpectations: Remove entry after test removal.
  • platform/wpe/fast/dom/HTMLMeterElement/meter-element-expected.txt: Renamed from LayoutTests/platform/glib/fast/dom/HTMLMeterElement/meter-element-expected.txt.
  • platform/wpe/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt: Renamed from LayoutTests/platform/glib/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt.
  • platform/wpe/fast/dom/HTMLMeterElement/meter-styles-expected.txt: Renamed from LayoutTests/platform/glib/fast/dom/HTMLMeterElement/meter-styles-expected.txt.
  • platform/wpe/fast/dom/HTMLProgressElement/progress-bar-value-pseudo-element-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Rebaselined after r270023.

2:04 PM Changeset in webkit [270132] by ggaren@apple.com
  • 5 edits in trunk

Use a Version 1 CFRunLoopSource for faster task dispatch
https://bugs.webkit.org/show_bug.cgi?id=202874

Reviewed by Simon Fraser.

Source/WTF:

This performance bottleneck showed up in IndexedDB. We worked around it
by switching to WorkQueueMessageReceiver. Now it's showing up again
in the GPU Process.

  • wtf/RunLoop.h: Added a mach port. We use this for wake-up.
  • wtf/cf/RunLoopCF.cpp:

(WTF::RunLoop::performWork): Use the standard declaration for a
Version 1 run loop source callback.

(WTF::RunLoop::RunLoop): Use a dummy mach port for wake-ups. The default
wake-up mechanism uses pthread APIs, which cost hundreds of microseconds
per invocation, even on the most modern hardware. In contrast, a mach
message takes about nine microseconds.

(WTF::RunLoop::~RunLoop): Free the mach port.

(WTF::RunLoop::wakeUp): Copy-pasted code to signal a mach port. The
message payload doesn't matter because we're just trying to achieve
a wakeup, kind of like calling a void() function.

Tools:

Fixed a test incompatibiilty.

  • TestWebKitAPI/cocoa/UtilitiesCocoa.mm:

(TestWebKitAPI::Util::spinRunLoop): Be sure to run the runloop until
it runs out of sources to handle.

The SuspendServiceWorkerProcessBasedOnClientProcesses test invokes
spinRunLoop while adding items to the runloop. Under those conditions,
whether a given source will fire or not in a single invocation of
CFRunLoopRunInMode is undefined behavior.

1:27 PM Changeset in webkit [270131] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Revert r270124. Made the test worse.
https://bugs.webkit.org/show_bug.cgi?id=219212

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:21 PM Changeset in webkit [270130] by Simon Fraser
  • 24 edits in trunk/Source

Dispatch main-thread overflow scrolls to the scrolling thread as we do for page scrolls
https://bugs.webkit.org/show_bug.cgi?id=219213

Reviewed by Tim Horton.
Source/WebCore:

Unify the behavior of overflow scrolling and page scrolling for synchronous scrolls.

Somewhat surprisingly, synchronous page scrolls move layers via a dispatch to the scrolling thread in
FrameView::handleWheelEventForScrolling(), but overflow scrolls just did main thread compositing updates
to set the new layer positions.

A future patch will require that the "began" event for a synchronous scroll gets back to the scrolling thread,
so unify these code paths to have overflow scrolls also leverage handleWheelEventAfterMainThread(), via
RenderLayer::handleWheelEventForScrolling().

There's some fallout from this. ThreadedScrollingTree::handleWheelEventAfterMainThread() calls into handleWheelEventWithNode(),
but in this special case that codepath needs to know that we're in a special "post main thread" mode that should

  1. Behave as if the node is latched, i.e. don't propagate to parent nodes, and target the node if if it's scrolled to a the min or max to allow rubberbanding
  2. Scroll even if the node has synchronous scrolling reasons

This mode is represented by the EventTargeting value.

Finally, EventHandler::handleWheelEventInternal() should only clear latching state if the content has called preventDefault()
on the event.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleWheelEventInternal):

  • page/scrolling/ScrollLatchingController.cpp:

(WebCore::ScrollLatchingController::updateAndFetchLatchingStateForFrame):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEventWithNode):

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

(WebCore::ScrollingTreeScrollingNode::canHandleWheelEvent const):
(WebCore::ScrollingTreeScrollingNode::handleWheelEvent):

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

(WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread):

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

(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent):

  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::handleWheelEvent):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::handleWheelEventForScrolling):

  • rendering/RenderLayer.h:

Source/WebKit:

Unify the behavior of overflow scrolling and page scrolling for synchronous scrolls.

Somewhat surprisingly, synchronous page scrolls move layers via a dispatch to the scrolling thread in
FrameView::handleWheelEventForScrolling(), but overflow scrolls just did main thread compositing updates
to set the new layer positions.

A future patch will require that the "began" event for a synchronous scroll gets back to the scrolling thread,
so unify these code paths to have overflow scrolls also leverage handleWheelEventAfterMainThread(), via
RenderLayer::handleWheelEventForScrolling().

There's some fallout from this. ThreadedScrollingTree::handleWheelEventAfterMainThread() calls into handleWheelEventWithNode(),
but in this special case that codepath needs to know that we're in a special "post main thread" mode that should

  1. Behave as if the node is latched, i.e. don't propagate to parent nodes, and target the node if if it's scrolled to a the min or max to allow rubberbanding
  2. Scroll even if the node has synchronous scrolling reasons

This mode is represented by the EventTargeting value.

Finally, EventHandler::handleWheelEventInternal() should only clear latching state if the content has called preventDefault()
on the event.

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent):

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
  • UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:

(WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::handleWheelEvent):

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h:
12:56 PM Changeset in webkit [270129] by James Darpinian
  • 868 edits
    10 copies
    12 moves
    147 adds
    9 deletes in trunk

Update ANGLE 2020-11-12
https://bugs.webkit.org/show_bug.cgi?id=218877

Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

  • Excessively large list of upstream changes omitted.

LayoutTests:

  • webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt: Test fixed.
12:54 PM Changeset in webkit [270128] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] Rename LineIteratorLegacy::logicalLeft/right to contentLeft/right
https://bugs.webkit.org/show_bug.cgi?id=219215

Reviewed by Antti Koivisto.

These functions are supposed to return the position where the content starts/ends inside the line box (see text-alignment as an example
where the line's logical left edge is not where content starts).

(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • layout/integration/LayoutIntegrationLineIterator.h:

(WebCore::LayoutIntegration::PathLine::selectionRect const):
(WebCore::LayoutIntegration::PathLine::contentLogicalLeft const):
(WebCore::LayoutIntegration::PathLine::contentLogicalRight const):
(WebCore::LayoutIntegration::PathLine::logicalLeft const): Deleted.
(WebCore::LayoutIntegration::PathLine::logicalRight const): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LineIteratorLegacyPath::contentLogicalLeft const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::contentLogicalRight const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::logicalLeft const): Deleted.
(WebCore::LayoutIntegration::LineIteratorLegacyPath::logicalRight const): Deleted.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::contentLogicalLeft const):
(WebCore::LayoutIntegration::LineIteratorModernPath::contentLogicalRight const):
(WebCore::LayoutIntegration::LineIteratorModernPath::logicalLeft const): Deleted.
(WebCore::LayoutIntegration::LineIteratorModernPath::logicalRight const): Deleted.

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::localCaretRect const):
(WebCore::RenderLineBreak::collectSelectionRects):

12:48 PM Changeset in webkit [270127] by Chris Dumez
  • 9 edits
    3 adds in trunk

AudioWorkletProcessor::process() may get called on non-audio worklet thread and crash
https://bugs.webkit.org/show_bug.cgi?id=219209

Reviewed by Geoffrey Garen.

Source/WebCore:

If the AudioContext is already running when the AudioWorklet becomes ready, then the
AudioWorkletNode::process() was getting called on the CoreAudio rendering thread instead
of the AudioWorklet thread. This was causing us to run the AudioWorkletProcessor's JS
on the wrong thread, which would cause flaky crashes in release and assertion hits in
debug.

To address the issue, I updated AudioWorkletNode::process() to output silence when
it is called on another thread than the AudioWorklet thread. Also, if the AudioContext
is already running when the AudioWorklet becomes ready, we need to restart the
AudioDestination so that we switch the audio rendering from the CoreAudio rendering
thread to the AudioWorklet thread.

Test: http/wpt/webaudio/the-audio-api/the-audioworklet-interface/context-already-rendering.html

  • Modules/webaudio/AudioDestinationNode.h:

(WebCore::AudioDestinationNode::restartRendering):

  • Modules/webaudio/AudioWorkletNode.cpp:

(WebCore::AudioWorkletNode::isWorkletThread):
(WebCore::AudioWorkletNode::process):

  • Modules/webaudio/AudioWorkletNode.h:
  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::addAudioParamDescriptors):
(WebCore::BaseAudioContext::workletIsReady):

  • Modules/webaudio/BaseAudioContext.h:
  • Modules/webaudio/DefaultAudioDestinationNode.cpp:

(WebCore::DefaultAudioDestinationNode::uninitialize):
(WebCore::DefaultAudioDestinationNode::startRendering):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::suspend):
(WebCore::DefaultAudioDestinationNode::restartRendering):
(WebCore::DefaultAudioDestinationNode::setChannelCount):

  • Modules/webaudio/DefaultAudioDestinationNode.h:

LayoutTests:

Add layout test coverage.

  • http/wpt/webaudio/the-audio-api/the-audioworklet-interface/context-already-rendering-expected.txt: Added.
  • http/wpt/webaudio/the-audio-api/the-audioworklet-interface/context-already-rendering.html: Added.
  • http/wpt/webaudio/the-audio-api/the-audioworklet-interface/processors/basic-processor.js: Added.

(BasicProcessor.prototype.process):
(BasicProcessor):

11:58 AM Changeset in webkit [270126] by Lauro Moura
  • 5 edits
    1 move
    1 add
    1 delete in trunk

canvas: drawImage should not raise IndexSizeError on empty sources
https://bugs.webkit.org/show_bug.cgi?id=219068

Reviewed by Noam Rosenthal.

Source/WebCore:

Per 4.12.5.1.14 Drawing images[1] point 5, if the src rect has one of the dimensions zero, return silently.

[1] https://html.spec.whatwg.org/multipage/canvas.html#drawing-images

Covered by existing tests and fixes WPT offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource flakiness

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage): Return early instead of raising an exception if the rect is empty.

LayoutTests:

Update baselines and tests with new drawImage behavior of not raising IndexSizeError on empty src rects.

  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap-expected.txt: Updated with new drawImage behavior
  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap.html: Updated with new drawImage behavior
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource-expected.txt.
  • platform/gtk/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource-expected.txt: Removed.
11:37 AM Changeset in webkit [270125] by Simon Fraser
  • 15 edits in trunk/Source

Rename some wheel-event handling functions for clarity
https://bugs.webkit.org/show_bug.cgi?id=219211

Reviewed by Tim Horton.
Source/WebCore:

There are too many functions called wheelEvent() or handleWheelEvent(), making it hard
to know which phase of handling they apply to. So rename some to handleWheelEventForScrolling(),
which applies to the "default handling" phase after DOM event dispatch.

In addition, make ScrollableArea's handleWheelEventForScrolling() virtual and have FrameView
override it (a future patch will also add an override in RenderLayer).

Rename ScrollingCoordinator::performDefaultWheelEventHandling() to use handleWheelEventForScrolling()
for clarity.

  • page/EventHandler.cpp:

(WebCore::handleWheelEventInAppropriateEnclosingBox):
(WebCore::EventHandler::processWheelEventForScrolling):
(WebCore::EventHandler::defaultWheelEventHandler):

  • page/FrameView.cpp:

(WebCore::FrameView::handleWheelEventForScrolling):
(WebCore::FrameView::wheelEvent): Deleted.

  • page/FrameView.h:
  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::determineWheelEventTarget):
(WebCore::EventHandler::processWheelEventForScrolling):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::handleWheelEventForScrolling):
(WebCore::ScrollingCoordinator::performDefaultWheelEventHandling): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::scrollTo):

  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::handleWheelEventForScrolling):
(WebCore::ScrollingCoordinatorMac::performDefaultWheelEventHandling): Deleted.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::handleWheelEventForScrolling):
(WebCore::ScrollingCoordinatorNicosia::performDefaultWheelEventHandling): Deleted.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::handleWheelEventForScrolling):
(WebCore::ScrollableArea::handleWheelEvent): Deleted.

  • platform/ScrollableArea.h:

Source/WebKit:

There are too many functions called wheelEvent() or handleWheelEvent(), making it hard
to know which phase of handling they apply to. So rename some to handleWheelEventForScrolling(),
which applies to the "default handling" phase after DOM event dispatch.

In addition, make ScrollableArea's handleWheelEventForScrolling() virtual and have FrameView
override it (a future patch will also add an override in RenderLayer).

Rename ScrollingCoordinator::performDefaultWheelEventHandling() to use handleWheelEventForScrolling()
for clarity.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::handleWheelEvent):

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

http/tests/security/contentSecurityPolicy/1.1/plugintypes-affects-child.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=219212

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:40 AM Changeset in webkit [270123] by Alan Bujtas
  • 34 edits in trunk

[LFC][Integration] Enable inline-block
https://bugs.webkit.org/show_bug.cgi?id=218889

Reviewed by Antti Koivisto.

Source/WebCore:

  • layout/integration/LayoutIntegrationCoverage.cpp:

LayoutTests:

  • platform/ios/fast/block/float/overhanging-tall-block-expected.txt:
  • platform/ios/fast/css/named-images-expected.txt:
  • platform/ios/fast/css/text-overflow-input-expected.txt:
  • platform/ios/fast/dom/HTMLMeterElement/meter-element-repaint-on-update-value-expected.txt:
  • platform/ios/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.txt:
  • platform/ios/fast/dom/HTMLProgressElement/native-progress-bar-expected.txt:
  • platform/ios/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/ios/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/ios/svg/transforms/svg-css-transforms-clip-path-expected.txt:
  • platform/ios/svg/transforms/svg-css-transforms-expected.txt:
  • platform/ios/transforms/3d/general/perspective-units-expected.txt:
  • platform/ios/transforms/svg-vs-css-expected.txt:
  • platform/mac-catalina/fast/css/text-overflow-input-expected.txt:
  • platform/mac-mojave/fast/css/text-overflow-input-expected.txt:
  • platform/mac/fast/block/float/overhanging-tall-block-expected.txt:
  • platform/mac/fast/css/named-images-expected.txt:
  • platform/mac/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.txt:
  • platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/mac/fast/text/hyphenate-limit-before-after-expected.txt:
  • platform/mac/fast/text/international/bidi-LDB-2-CSS-expected.txt:

These are progressions where the content is subpixel taller than the computed height for the containing block:

  • platform/mac/svg/transforms/svg-css-transforms-clip-path-expected.txt:
  • platform/mac/svg/transforms/svg-css-transforms-expected.txt:
  • platform/mac/transforms/3d/general/perspective-units-expected.txt:
  • platform/mac/transforms/svg-vs-css-expected.txt:
10:11 AM Changeset in webkit [270122] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed fix for my build fix.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _appendAppLinkOpenActionsForURL:actions:elementInfo:]):
You have to spell DEPRECATED correctly for this to work.

9:56 AM Changeset in webkit [270121] by Ryan Haddad
  • 7 edits in trunk/Source/WebCore

Unreviewed, reverting r270064.

Broke the macCatayst build

Reverted changeset:

"Link against the ANGLE Shared Library"
https://bugs.webkit.org/show_bug.cgi?id=218539
https://trac.webkit.org/changeset/270064

9:54 AM Changeset in webkit [270120] by don.olmstead@sony.com
  • 17 edits
    1 delete in trunk

Remove quota module
https://bugs.webkit.org/show_bug.cgi?id=219206

Reviewed by Anders Carlsson.

.:

Remove the ability to set ENABLE_QUOTA. The Storage Quota API is deprecated and no
WebKit port is enabling it.

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

Source/WebCore:

Remove the files and any reference to the quota module.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/quota/DOMWindow+Quota.idl: Removed.
  • Modules/quota/DOMWindowQuota.cpp: Removed.
  • Modules/quota/DOMWindowQuota.h: Removed.
  • Modules/quota/Navigator+StorageQuota.idl: Removed.
  • Modules/quota/NavigatorStorageQuota.cpp: Removed.
  • Modules/quota/NavigatorStorageQuota.h: Removed.
  • Modules/quota/StorageErrorCallback.cpp: Removed.
  • Modules/quota/StorageErrorCallback.h: Removed.
  • Modules/quota/StorageErrorCallback.idl: Removed.
  • Modules/quota/StorageInfo.cpp: Removed.
  • Modules/quota/StorageInfo.h: Removed.
  • Modules/quota/StorageInfo.idl: Removed.
  • Modules/quota/StorageQuota.cpp: Removed.
  • Modules/quota/StorageQuota.h: Removed.
  • Modules/quota/StorageQuota.idl: Removed.
  • Modules/quota/StorageQuotaCallback.h: Removed.
  • Modules/quota/StorageQuotaCallback.idl: Removed.
  • Modules/quota/StorageUsageCallback.h: Removed.
  • Modules/quota/StorageUsageCallback.idl: Removed.
  • Modules/quota/WorkerNavigator+StorageQuota.idl: Removed.
  • Modules/quota/WorkerNavigatorStorageQuota.cpp: Removed.
  • Modules/quota/WorkerNavigatorStorageQuota.h: Removed.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WTF:

Remove the ENABLE_QUOTA macro.

  • wtf/PlatformEnable.h:

Tools:

Remove the option to ENABLE_QUOTA.

  • Scripts/webkitperl/FeatureList.pm:
9:47 AM Changeset in webkit [270119] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Hit test runs in reverse order
https://bugs.webkit.org/show_bug.cgi?id=219205

Reviewed by Zalan Bujtas.

In overlap case the latter boxes should be hit first.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::hitTest):

9:46 AM Changeset in webkit [270118] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the build with recent SDKs.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _appendAppLinkOpenActionsForURL:actions:elementInfo:]):

8:09 AM Changeset in webkit [270117] by youenn@apple.com
  • 7 edits in trunk

Make webrtc/captureCanvas-webrtc-software-h264-*.html tests use codecs in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=219147

Reviewed by Eric Carlson.

Source/WebCore:

Expose internals setting to disable WebRTC codecs in GPU process.
Covered by existing tests.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setWebRTCPlatformCodecsInGPUProcessEnabled):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

LayoutTests:

  • webrtc/captureCanvas-webrtc-software-h264-baseline.html:
  • webrtc/captureCanvas-webrtc-software-h264-high.html:
8:09 AM Changeset in webkit [270116] by svillar@igalia.com
  • 8 edits in trunk

[css-flex] Images as flex items should use the overridingLogicalWidth when defined to compute the logical height
https://bugs.webkit.org/show_bug.cgi?id=219195

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Replaced 15 FAIL by PASS expectations.

  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-001-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-002v-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-005-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-006v-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-007-expected.txt:

Source/WebCore:

This is the same fix than the one we did in r270073 but for the other axis. RenderReplaced should use the overridingLogicalWidth
whenever defined instead of the specified logical width to compute the logical height using an intrinsic aspect ratio.
The overriding width is set by flex containers that need to stretch/shrink their items. The current code was not considering
this case and thus, the intrinsic (non-stretched) logical height was used to compute the logical width,
meaning that the stretching set by the flexbox container was ignored.

This patch allows WebKit to pass 15 subtests in already existing aspect ratio flexbox tests from WPT.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeReplacedLogicalHeight const): Use the overriding logical width if defined in presence of a valid aspect ratio.

7:45 AM Changeset in webkit [270115] by don.olmstead@sony.com
  • 8 edits in trunk/Source/WebCore

Use final in generated callback code
https://bugs.webkit.org/show_bug.cgi?id=219169

Reviewed by Darin Adler.

Generated callbacks descend from ContextDestructionObserver and are final. The
scriptExecutionContext method is not virtual so adding override errors. Remove the virtual
for that case and mark the destructor as final.

Regenerated bindings through run-bindings-tests.

  • bindings/scripts/CodeGeneratorJS.pm:
  • bindings/scripts/test/JS/JSTestCallbackFunction.h:
  • bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
  • bindings/scripts/test/JS/JSTestCallbackInterface.h:
  • bindings/scripts/test/JS/JSTestVoidCallbackFunction.h:
6:57 AM Changeset in webkit [270114] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Move horizontal space tracking from Line to LineBuilder
https://bugs.webkit.org/show_bug.cgi?id=219185

Reviewed by Antti Koivisto.

Let's move the available horizontal space tracking from Line to LineBuilder. Since the LineBuilder decides what to put on the line
the Line object does not need to know how much available space there is.
This is also in preparation for adding float support on (vertically) stretchy lines where the horizontal available space may vary
depending on how much the inline level boxes stretch the line vertically.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::removeCollapsibleContent):
(WebCore::Layout::Line::applyRunExpansion):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::visuallyCollapsePreWrapOverflowContent):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::moveLogicalRight): Deleted.

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::contentLogicalWidth const):
(WebCore::Layout::Line::horizontalConstraint const): Deleted.
(WebCore::Layout::Line::availableWidth const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::commitFloats):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLine):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::availableWidth const):

6:57 AM Changeset in webkit [270113] by Philippe Normand
  • 2 edits in trunk/Source/WebKit

Unreviewed, GTK build warning fix

  • UIProcess/Inspector/glib/RemoteInspectorClient.cpp: Mark configurationForRemoteInspector

as override of corresponding parent class method declaration.

6:49 AM Changeset in webkit [270112] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.30.3

WPE WebKit 2.30.3

6:49 AM Changeset in webkit [270111] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.30

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

.:

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

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.30.3.
6:47 AM Changeset in webkit [270110] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Take alignment offset into account when computing line iterator logicalLeft
https://bugs.webkit.org/show_bug.cgi?id=219197

Reviewed by Zalan Bujtas.

This fixes editing/style/text-indent.html with LFC editing enabled.

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::logicalLeft const):

5:32 AM Changeset in webkit [270109] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] BoxGeometry only tracks the reserved horizontal/vertical space for the scrollbars
https://bugs.webkit.org/show_bug.cgi?id=219178

Reviewed by Antti Koivisto.

BoxGeometry does not care whether it's a horizontal or vertical scrollbar. It only cares about the space we need to reserve for them.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):

  • layout/layouttree/LayoutBoxGeometry.cpp:

(WebCore::Layout::BoxGeometry::BoxGeometry):
(WebCore::Layout::BoxGeometry::paddingBox const):

  • layout/layouttree/LayoutBoxGeometry.h:

(WebCore::Layout::BoxGeometry::borderBoxHeight const):
(WebCore::Layout::BoxGeometry::borderBoxWidth const):
(WebCore::Layout::BoxGeometry::verticalSpaceForScrollbar const):
(WebCore::Layout::BoxGeometry::horizontalSpaceForScrollbar const):
(WebCore::Layout::BoxGeometry::setVerticalSpaceForScrollbar):
(WebCore::Layout::BoxGeometry::setHorizontalSpaceForScrollbar):
(WebCore::Layout::BoxGeometry::verticalScrollbarWidth const): Deleted.
(WebCore::Layout::BoxGeometry::horizontalScrollbarHeight const): Deleted.
(WebCore::Layout::BoxGeometry::setVerticalScrollbarWidth): Deleted.
(WebCore::Layout::BoxGeometry::setHorizontalScrollbarHeight): Deleted.

5:24 AM Changeset in webkit [270108] by Alan Bujtas
  • 34 edits in trunk

Unreviewed, reverting r270070.

broke an API test

Reverted changeset:

"[LFC][Integration] Enable inline-block"
https://bugs.webkit.org/show_bug.cgi?id=218889
https://trac.webkit.org/changeset/270070

4:25 AM Changeset in webkit [270107] by youenn@apple.com
  • 41 edits
    13 copies
    4 moves
    11 adds
    2 deletes in trunk

Add support for RTCRtpScriptTransform
https://bugs.webkit.org/show_bug.cgi?id=219148

Reviewed by Eric Carlson.

Source/WebCore:

We introduce RTCRtpScriptTransform which processes encoded frames in a worker for either RTCRtpSender or RTCRtpReceiver.
The model follows AudioWorkletNode in the sense that we create a RTCRtpScriptTransform object in main thread that is used with RTCRtp objects.
The RTCRtpScriptTransform takes a name and a worker as parameters to create a RTCRtpScriptTransformer counter part in a worker.
Before that, RTCRtpScriptTransformer constructors are registered in the worker with a specific name.
A message port is shared between RTCRtpScriptTransform and RTCRtpScriptTransformer.

RTCRtpScriptTransform keeps a weak pointer to RTCRtpScriptTransformer so that we keep all ref counting of RTCRtpScriptTransformer in the worker thread.
To make sure RTCRtpScriptTransformer stays alive for long enough, we set a pending activity when RTCRtpScriptTransform is linked to its RTCRtpScriptTransformer.
The pending activity is then removed either at worker closure or RTCRtpScriptTransform being no longer doing processing.

We expose individual compressed frames as RTCEncodedAudioFrame and RTCEncodedVideoFrame.
Accessor is limited to the raw data but additional getters should be added later on.

To implement RTCRtpScriptTransformer, we have to be able to create WritableStream with native sinks.
This is why we introduce WritableStreamSink and WritableStream C++ classes.
Binding between native frames and streams is done through RTCRtpReadableStreamSource and RTCRtpWritableStreamSink.

Test: http/wpt/webrtc/webrtc-transform.html and http/wpt/webrtc/sframe-transform.html.

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

(WebCore::RTCEncodedAudioFrame::RTCEncodedAudioFrame):

  • Modules/mediastream/RTCEncodedAudioFrame.h: Added.

(WebCore::RTCEncodedAudioFrame::create):

  • Modules/mediastream/RTCEncodedAudioFrame.idl: Added.
  • Modules/mediastream/RTCEncodedFrame.h: Added.
  • Modules/mediastream/RTCEncodedFrame.cpp: Added.
  • Modules/mediastream/RTCEncodedVideoFrame.cpp: Added.

(WebCore::RTCEncodedVideoFrame::RTCEncodedVideoFrame):

  • Modules/mediastream/RTCEncodedVideoFrame.h: Added.

(WebCore::RTCEncodedVideoFrame::create):

  • Modules/mediastream/RTCEncodedVideoFrame.idl: Added.
  • Modules/mediastream/RTCRtpReceiver+Transform.idl:
  • Modules/mediastream/RTCRtpReceiver.cpp:

(WebCore::RTCRtpReceiver::setTransform):
(WebCore::RTCRtpReceiver::transform):

  • Modules/mediastream/RTCRtpReceiver.h:
  • Modules/mediastream/RTCRtpReceiverWithTransform.h:

(WebCore::RTCRtpReceiverWithTransform::transform):
(WebCore::RTCRtpReceiverWithTransform::setTransform):

  • Modules/mediastream/RTCRtpSFrameTransform.cpp:

(WebCore::RTCRtpSFrameTransform::initializeTransformer):

  • Modules/mediastream/RTCRtpSFrameTransform.h:

(WebCore::RTCRtpSFrameTransform::isAttached const):

  • Modules/mediastream/RTCRtpSFrameTransform.idl:
  • Modules/mediastream/RTCRtpScriptTransform.cpp: Added.

(WebCore::RTCRtpScriptTransform::create):
(WebCore::RTCRtpScriptTransform::RTCRtpScriptTransform):
(WebCore::RTCRtpScriptTransform::~RTCRtpScriptTransform):
(WebCore::RTCRtpScriptTransform::setTransformer):
(WebCore::RTCRtpScriptTransform::initializeBackendForReceiver):
(WebCore::RTCRtpScriptTransform::initializeBackendForSender):
(WebCore::RTCRtpScriptTransform::willClearBackend):
(WebCore::RTCRtpScriptTransform::initializeTransformer):

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

(WebCore::RTCRtpReadableStreamSource::create):
(WebCore::RTCRtpReadableStreamSource::close):
(WebCore::RTCRtpReadableStreamSource::enqueue):
(WebCore::RTCRtpWritableStreamSink::create):
(WebCore::RTCRtpWritableStreamSink::RTCRtpWritableStreamSink):
(WebCore::RTCRtpWritableStreamSink::write):
(WebCore::RTCRtpScriptTransformer::create):
(WebCore::RTCRtpScriptTransformer::RTCRtpScriptTransformer):
(WebCore::RTCRtpScriptTransformer::~RTCRtpScriptTransformer):
(WebCore::RTCRtpScriptTransformer::start):
(WebCore::RTCRtpScriptTransformer::clear):

  • Modules/mediastream/RTCRtpScriptTransformer.h: Added.

(WebCore::RTCRtpScriptTransformer::setCallback):
(WebCore::RTCRtpScriptTransformer::port):
(WebCore::RTCRtpScriptTransformer::startPendingActivity):
(WebCore::RTCRtpScriptTransformer::activeDOMObjectName const):
(WebCore::RTCRtpScriptTransformer::stopPendingActivity):

  • Modules/mediastream/RTCRtpScriptTransformer.idl: Added.
  • Modules/mediastream/RTCRtpScriptTransformerConstructor.h: Added.
  • Modules/mediastream/RTCRtpScriptTransformerConstructor.idl: Added.
  • Modules/mediastream/RTCRtpSender+Transform.idl:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::setTransform):
(WebCore::RTCRtpSender::transform):

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

(WebCore::RTCRtpSenderWithTransform::transform):
(WebCore::RTCRtpSenderWithTransform::setTransform):

  • Modules/mediastream/RTCRtpTransform.cpp:

(WebCore::RTCRtpTransform::from):
(WebCore::RTCRtpTransform::RTCRtpTransform):
(WebCore::RTCRtpTransform::~RTCRtpTransform):
(WebCore::RTCRtpTransform::isAttached const):
(WebCore::RTCRtpTransform::attachToReceiver):
(WebCore::RTCRtpTransform::attachToSender):
(WebCore::RTCRtpTransform::clearBackend):
(WebCore::RTCRtpTransform::detachFromReceiver):
(WebCore::RTCRtpTransform::detachFromSender):

  • Modules/mediastream/RTCRtpTransform.h:

(WebCore::RTCRtpTransform::internalTransform):

  • Modules/mediastream/RTCRtpTransformBackend.h:
  • Modules/mediastream/RTCRtpTransformableFrame.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.cpp:

(WebCore::LibWebRTCRtpTransformBackend::setInputCallback):
(WebCore::LibWebRTCRtpTransformBackend::Transform):

  • Modules/streams/WritableStreamSink.h: Added.
  • Modules/streams/WritableStreamSink.idl: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/ReadableStreamDefaultController.cpp:

(WebCore::ReadableStreamDefaultController::enqueue):

  • bindings/js/ReadableStreamDefaultController.h:
  • bindings/js/WebCoreBuiltinNames.h:
  • bindings/js/WritableStream.cpp: Added.

(WebCore::WritableStream::create):

  • bindings/js/WritableStream.h: Added.

(WebCore::JSWritableStreamWrapperConverter::toWrapped):
(WebCore::WritableStream::WritableStream):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • dom/EventTargetFactory.in:
  • testing/Internals.cpp:
  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/MockRTCRtpTransform.cpp:

(WebCore::MockRTCRtpTransformer::transform):

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::registerRTCRtpScriptTransformer):
(WebCore::DedicatedWorkerGlobalScope::createRTCRtpScriptTransformer):

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

(WebCore::Worker::addRTCRtpScriptTransformer):
(WebCore::Worker::createRTCRtpScriptTransformer):
(WebCore::Worker::postTaskToWorkerGlobalScope):

  • workers/Worker.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postTaskToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskToWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerObjectProxy.h:

(WebCore::WorkerObjectProxy::postTaskToWorkerObject):

LayoutTests:

  • http/wpt/webrtc/routines.js: Added.

(createConnections):

  • http/wpt/webrtc/script-transform.js: Added.

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

  • http/wpt/webrtc/sframe-transform-expected.txt: Added.
  • http/wpt/webrtc/sframe-transform.html: Added.
  • http/wpt/webrtc/webrtc-transform-expected.txt: Renamed from LayoutTests/webrtc/webrtc-transform-expected.txt.
  • http/wpt/webrtc/webrtc-transform.html: Renamed from LayoutTests/webrtc/webrtc-transform.html.
  • platform/glib/TestExpectations:
  • webrtc/script-transform.js: Added.

(MockRTCRtpTransformer):
(MockRTCRtpTransformer.prototype.start):

4:19 AM Changeset in webkit [270106] by Philippe Normand
  • 7 edits
    1 copy
    1 move
    1 add in trunk

[MSE] Infinite loop in sample eviction when duration is NaN
https://bugs.webkit.org/show_bug.cgi?id=218228

Reviewed by Darin Adler.

Source/WebCore:

Avoid infinite loop in evictCodedFrames for live streams

When playing live streams the MediaSource DOM duration attribute has no meaning
and would thus be set as +inf. When seeks are triggered to positions prior to
the current playback position the SourceBuffer might attempt to free some space
in order to keep the amount of memory used under control. It proceeds in 2
steps:

  1. Attempt to free space represented by buffered range from media start up until current playback position - 30 seconds.
  2. If step 1 didn't free enough memory, attempt to release memory represented by buffered ranges starting from current playback position + 30 seconds until media duration.

Step 2 here wasn't taking into account the case where MediaSource.duration is
actually invalid, and thus was entering an infinite loop.

Test: media/media-source/live-rewind-seek-and-evict.html

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::evictCodedFrames):

Source/WTF:

  • wtf/MediaTime.h: New isFinite() method, to check if the MediaTime is valid and represents

a finite value, eg not NaN or Infinite.

LayoutTests:

  • media/media-source/live-rewind-seek-and-evict-expected.txt: Renamed from LayoutTests/platform/glib/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt.
  • media/media-source/live-rewind-seek-and-evict.html: Added.
  • media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt:
  • media/media-source/mock-media-source.js:

(makeAInit):

  • platform/mac/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt: Copied from LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt.
4:13 AM Changeset in webkit [270105] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.30.3

WebKitGTK 2.30.3

4:13 AM Changeset in webkit [270104] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.30.3 release

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.30.3.
3:48 AM Changeset in webkit [270103] by Fujii Hironori
  • 4 edits in trunk

[TextureMapper] Hidden surface removal issue for nested transform-style:perserve-3d in Snow Stack demo
https://bugs.webkit.org/show_bug.cgi?id=218969

Reviewed by Carlos Garcia Campos.

Source/WebCore:

r267711 enabled a depth buffer for a perserve-3d layer, but it
didn't work nicely for nested perserve-3d, for example Snow Stack
demo. It needs a intermediate surface to properly render
interchangeably nested perserve-3d and non perserve-3d layers, for
example transforms/3d/point-mapping/3d-point-mapping-deep.html.
This change supports only simply nested perserve-3d layers such
like Snow Stack demo.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelfAndChildren): Added
Preserves3DScope to call beginPreserves3D and endPreserves3D.

LayoutTests:

  • platform/gtk/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png: Rebaselined.
3:40 AM Changeset in webkit [270102] by Chris Lord
  • 87 edits
    1 copy
    23 adds in trunk

Enable font functions on OffscreenCanvas for main-thread
https://bugs.webkit.org/show_bug.cgi?id=219088

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update test expectations for OffscreenCanvas text tests and add where
they were missing.

  • web-platform-tests/html/canvas/offscreen/text/*:

Source/WebCore:

Move some font-related code from CanvasRenderingContext2D to
CanvasRenderingContext2DBase so it can be shared by OffscreenCanvas
and enable font functions on the OffscreenCanvas rendering context.
Font setting only works when a Document is available, so this only
enables drawing/measuring of text on the main thread.

No new tests. Rebaselined existing tests.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::fontProxy const):
(WebCore::CanvasRenderingContext2D::drawTextInternal):

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

(WebCore::CanvasRenderingContext2DBase::font const):
(WebCore::toCanvasTextAlign):
(WebCore::fromCanvasTextAlign):
(WebCore::CanvasRenderingContext2DBase::textAlign const):
(WebCore::CanvasRenderingContext2DBase::setTextAlign):
(WebCore::toCanvasTextBaseline):
(WebCore::fromCanvasTextBaseline):
(WebCore::CanvasRenderingContext2DBase::textBaseline const):
(WebCore::CanvasRenderingContext2DBase::setTextBaseline):
(WebCore::CanvasRenderingContext2DBase::setDirection):
(WebCore::CanvasRenderingContext2DBase::canDrawTextWithParams):
(WebCore::CanvasRenderingContext2DBase::normalizeSpaces):
(WebCore::CanvasRenderingContext2DBase::drawText):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
(WebCore::CanvasRenderingContext2DBase::measureTextInternal):
(WebCore::CanvasRenderingContext2DBase::textOffset):

  • html/canvas/CanvasRenderingContext2DBase.h:

(WebCore::CanvasRenderingContext2DBase::fontProxy):

  • html/canvas/OffscreenCanvasRenderingContext2D.cpp:

(WebCore::OffscreenCanvasRenderingContext2D::setFont):
(WebCore::OffscreenCanvasRenderingContext2D::direction const):
(WebCore::OffscreenCanvasRenderingContext2D::fontProxy const):
(WebCore::OffscreenCanvasRenderingContext2D::fillText):
(WebCore::OffscreenCanvasRenderingContext2D::strokeText):
(WebCore::OffscreenCanvasRenderingContext2D::measureText):

  • html/canvas/OffscreenCanvasRenderingContext2D.h:
  • html/canvas/OffscreenCanvasRenderingContext2D.idl:

LayoutTests:

Enable running OffscreenCanvas text tests.

  • platform/glib/TestExpectations:
3:05 AM Changeset in webkit [270101] by youenn@apple.com
  • 18 edits
    3 adds in trunk

Add support for RTCPeerConnection.onicecandidateerror event
https://bugs.webkit.org/show_bug.cgi?id=169644

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/idlharness.https.window-expected.txt:

Source/WebCore:

Expose RTCPeerConnection.onicecandidateerror and use it for wrong STUN/TURN server URLs.
For that matter, add RTCPeerConnectionIceErrorEvent as per spec with a slight change to the init directory to keep the same terminology between event and init dictionary.

Covered by updated webrtc/stun-server-filtering.html test.

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

(WebCore::RTCPeerConnection::iceServersFromConfiguration):
(WebCore::iceServersFromConfiguration): Deleted.

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp: Added.

(WebCore::RTCPeerConnectionIceErrorEvent::create):
(WebCore::RTCPeerConnectionIceErrorEvent::RTCPeerConnectionIceErrorEvent):
(WebCore::RTCPeerConnectionIceErrorEvent::eventInterface const):

  • Modules/mediastream/RTCPeerConnectionIceErrorEvent.h: Added.
  • Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/EventNames.h:
  • dom/EventNames.in:

LayoutTests:

  • webrtc/rtcpeerconnection-error-messages-expected.txt:
  • webrtc/stun-server-filtering.html:
2:47 AM Changeset in webkit [270100] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

Merge r270021 - Protect WebSocketChannel before calling client methods
https://bugs.webkit.org/show_bug.cgi?id=216791

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-11-19
Reviewed by Youenn Fablet.

Ensure we keep a reference to the WebSocketChannel before calling client methods that might close the channel.

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::close):
(WebKit::WebSocketChannel::fail):
(WebKit::WebSocketChannel::didClose):
(WebKit::WebSocketChannel::resume):

2:40 AM Changeset in webkit [270099] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.30

Merge r269837 - [TextureMapper] The edges of blur backdrop-filter look gradient tranparent
https://bugs.webkit.org/show_bug.cgi?id=218645
<rdar://problem/71356999>

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The blur backdrop-filter needs a larger input image than an output
image. However, it's not easy to get a larger input image in the
edges of the windows. Cocoa port is doing extrapolation by
duplicating edges pixels of the input image which has the same
size with the output image (Bug 146215). Take the same approach.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeOverlapRegions): Don't
inflate the local bounding rect by the outsets for backdrop
layers.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(sampleColorAtRadius): Don't clamp 'coord'.

LayoutTests:

  • platform/glib/css3/filters/backdrop/blur-input-bounds-expected.png: Added.
2:40 AM Changeset in webkit [270098] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.30

Merge r269772 - [GTK][WPE] CSS backdrop overlay corners are not rounded on results.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=215445

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Pass the backdropFiltersRect from CoordinatedGraphicsLayer through Nicosia to TextureMapperLayer. The
latter will use this value to clip when painting the backdrop layer.

Based on a patch created by Carlos Garcia Campos <cgarcia@igalia.com>.

  • platform/graphics/nicosia/NicosiaPlatformLayer.h:

(Nicosia::CompositionLayer::flushState):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelfAndChildren):
(WebCore::TextureMapperLayer::setBackdropFiltersRect):

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

(WebCore::CoordinatedGraphicsLayer::setBackdropFilters):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

Source/WebKit:

Pass the backdropFiltersRect from the state to TextureMapperLayer.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::updateSceneState):

LayoutTests:

Update expectations for passing tests.

  • platform/glib/TestExpectations:
2:40 AM Changeset in webkit [270097] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30

Merge r269599 - [TextureMapper] backdrop-filter should use the identity transform to render the root layer
https://bugs.webkit.org/show_bug.cgi?id=218699

Reviewed by Don Olmstead.

Source/WebCore:

Even thouth CSS reflections mirror the content, backdrop-filter in
the reflection doesn't. It sees through the background.
css3/filters/backdrop/backdrop-filter-with-reflection.html is the
test case.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
Removed TextureMapperPaintOptions::isReplica.

LayoutTests:

  • platform/glib/TestExpectations: Unmarked

css3/filters/backdrop/{backdrop-filter-with-reflection-add-backdrop.html,
backdrop-filter-with-reflection-value-change.html,backdrop-filter-with-reflection.html}

2:39 AM Changeset in webkit [270096] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.30

Merge r269588 - [TextureMapper] The top and left sides of drop-shadow are clipped
https://bugs.webkit.org/show_bug.cgi?id=218647

Reviewed by Don Olmstead.

Source/WebCore:

TextureMapperLayer::computeOverlapRegions incorrectly calculated
the local bounding rect for top and left of outsets.

The drop-shadow was incorrectly blended with the content.

Test: compositing/filters/drop-shadow.html

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeOverlapRegions): Stopped
using std::max for the left and top of outsets. Stopped taking the
unite with unfilteredTargetRect because outsets are always
positive.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

Fixed sourceOver().

LayoutTests:

  • compositing/filters/drop-shadow-expected.html: Added.
  • compositing/filters/drop-shadow.html: Added.
2:39 AM Changeset in webkit [270095] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.30

Merge r269570 - TextureMapperLayer::computeOverlapRegions: Accumulate nested replica transform matrices recursively
https://bugs.webkit.org/show_bug.cgi?id=218364

Reviewed by Don Olmstead.

Source/WebCore:

Transformed nested reflection layers were wrongly clipped because
computeOverlapRegions applied replica transform matrices
incorrectly.

Test: compositing/reflections/nested-reflection-opacity2.html

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::resolveOverlaps):
(WebCore::TextureMapperLayer::computeOverlapRegions):
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):

  • platform/graphics/texmap/TextureMapperLayer.h:

LayoutTests:

  • compositing/reflections/nested-reflection-opacity2-expected.html: Added.
  • compositing/reflections/nested-reflection-opacity2.html: Added.
2:39 AM Changeset in webkit [270094] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269569 - [GraphicsLayerTextureMapper] reflection masks aren't applied
https://bugs.webkit.org/show_bug.cgi?id=218429

Reviewed by Don Olmstead.

The backing store of the mask layer of replica layers aren't
updated at all since r178111.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
Use updateBackingStoreIncludingSubLayers for the replica layer to
update backing stores recursively instead of updating only one
layer by using updateBackingStoreIfNeeded.

2:39 AM Changeset in webkit [270093] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.30

Merge r269328 - [TextureMapper] Crashed in TextureMapperLayer::paintUsingOverlapRegions
https://bugs.webkit.org/show_bug.cgi?id=214817
<rdar://problem/66489090>

Reviewed by Don Olmstead.

Source/WebCore:

TextureMapperLayer::paintUsingOverlapRegions has the expression
overlapRegion.bounds().size().area() which crashes for a very
large layer.

computeOverlapRegions returned very large overlap and non-overlap
regions without taking the clip bounds into account.

Change computeOverlapRegions to return clipped regions.
paintUsingOverlapRegions no longer needs to clip the returned
regions.

Test: compositing/tiling/huge-layer-with-opacity.html

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeOverlapRegions):
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):

  • platform/graphics/texmap/TextureMapperLayer.h:

LayoutTests:

  • compositing/tiling/huge-layer-with-opacity-expected.html: Added.
  • compositing/tiling/huge-layer-with-opacity.html: Added.
2:38 AM Changeset in webkit [270092] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.30

Merge r269204 - [TextureMapper] Replica layers don't blend correctly because computeOverlapRegions doesn't take TextureMapperPaintOptions::transform into account
https://bugs.webkit.org/show_bug.cgi?id=218307

Reviewed by Don Olmstead.

Source/WebCore:

Blending in replica layers didn't work as expected because
computeOverlapRegions didn't take the transform of
TextureMapperPaintOptions into account. Rendering replica layers
are achieved by using the transform.

TextureMapperLayer::paintWithIntermediateSurface also should take
the transform. commitSurface no longer needs to transform by it.

Test: compositing/reflections/opacity-in-reflection.html

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeOverlapRegions):
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
(WebCore::commitSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):

  • platform/graphics/texmap/TextureMapperLayer.h:

LayoutTests:

  • compositing/reflections/opacity-in-reflection-expected.html: Added.
  • compositing/reflections/opacity-in-reflection.html: Added.
2:38 AM Changeset in webkit [270091] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269116 - TextureMapperLayer::paintWithIntermediateSurface: Reduce BitmapTextures by unifying replicaSurface and mainSurface
https://bugs.webkit.org/show_bug.cgi?id=217943

Reviewed by Don Olmstead.

TextureMapperLayer::paintWithIntermediateSurface was using two
BitmapTextures for the main layer and replica layer. But, a single
BitmapTexture suffices. Create a BitmapTexture and render both
layers onto it.

No new tests, no behavior changes.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):

  • platform/graphics/texmap/TextureMapperLayer.h:
2:38 AM Changeset in webkit [270090] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.30

Merge r269072 - [TextureMapper][GTK] Test compositing/clipping/border-radius-stacking-context-clip.html is failing
https://bugs.webkit.org/show_bug.cgi?id=214868

Reviewed by Carlos Garcia Campos.

Source/WebCore:

If a replica layer has m_state.pos, m_layerTransforms.combined
should be translated by them.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeTransformsRecursive):

  • platform/graphics/texmap/TextureMapperLayer.h:

LayoutTests:

  • platform/gtk/TestExpectations: Unmarked compositing/clipping/border-radius-stacking-context-clip.html.
  • platform/gtk/compositing/reflections/nested-reflection-transformed-expected.png: Updated.
  • platform/gtk/compositing/reflections/nested-reflection-transformed2-expected.png: Updated.
  • platform/gtk/compositing/reflections/reflection-positioning2-expected.png: Updated.
2:37 AM Changeset in webkit [270089] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269040 - [WPE] REGRESSION(r268992) Redefinition of min() inside TextureMapperShaderProgram for GLES > 3.0
https://bugs.webkit.org/show_bug.cgi?id=218231

Reviewed by Sergio Villar Senin.

Remove the definition of the min() function and replace its usage with an if. This works for
every GLSL version.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(WebCore::TextureMapperShaderProgram::create):
(WebCore::STRINGIFY): Deleted.

2:37 AM Changeset in webkit [270088] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r268992 - [TextureMapper] min(genIType) isn't supported for GLSL ES < 3.0
https://bugs.webkit.org/show_bug.cgi?id=218164

Reviewed by Don Olmstead.

Nothing is drawn in AC mode of WinCairo port since r268923.
r268923 added a shader code of using min of int type which is
supported since GLSL ES 3.0.

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp: Added fragmentTemplateES to define int type of min.

(WebCore::TextureMapperShaderProgram::create):

2:37 AM Changeset in webkit [270087] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269765 - [GTK][WPE] FilterInfo must cleared when reusing BitmapTextureGL
https://bugs.webkit.org/show_bug.cgi?id=218854

Reviewed by Carlos Garcia Campos.

Clear the FilterInfo attribute when reusing a BitmapTextureGL.

  • platform/graphics/texmap/BitmapTextureGL.cpp:

(WebCore::BitmapTextureGL::didReset):

2:36 AM Changeset in webkit [270086] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269179 - [GTK] Direct composited images may not be rendered after a window resize
https://bugs.webkit.org/show_bug.cgi?id=218292

Reviewed by Carlos Garcia Campos.

Ensure that valid buffers passed for ImageBackings are not destroyed until the
CoordinatedGraphicsScene consumes them.

  • platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp:

(Nicosia::ImageBackingTextureMapperImpl::flushUpdate):

  • platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

2:36 AM Changeset in webkit [270085] by Carlos Garcia Campos
  • 13 edits in releases/WebKitGTK/webkit-2.30

Merge r268923 - [GTK][WPE] Implement antialiased rounded rectangle clipping in TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=174457

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Implement rounded rectangle clipping in TextureMapperGL, supporting up to 10 simultaneous
rounded rectangle clips. TextureMapper::beginClip() now receives a rounded rectangle, and
it applies the appropriate clipping method as required.

The rounded rectangle clip implementation uses the fragment shader to calculate whether
each pixel is inside the defined rounded rectangles, and paints or skips it as needed.

  • platform/graphics/texmap/ClipStack.cpp:

(WebCore::ClipStack::addRoundedRect):

  • platform/graphics/texmap/ClipStack.h:

(WebCore::ClipStack::State::State):
(WebCore::ClipStack::roundedRectComponents const):
(WebCore::ClipStack::roundedRectInverseTransformComponents const):
(WebCore::ClipStack::roundedRectCount const):
(WebCore::ClipStack::isRoundedRectClipEnabled const):
(WebCore::ClipStack::isRoundedRectClipAllowed const):

  • platform/graphics/texmap/TextureMapper.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::prepareRoundedRectClip):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawTexturePlanarYUV):
(WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
(WebCore::TextureMapperGL::drawTexturePackedYUV):
(WebCore::TextureMapperGL::drawSolidColor):
(WebCore::TextureMapperGL::beginRoundedRectClip):
(WebCore::TextureMapperGL::beginClip):

  • platform/graphics/texmap/TextureMapperGL.h:
  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::paintSelfAndChildren):
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(WebCore::TextureMapperShaderProgram::create):

  • platform/graphics/texmap/TextureMapperShaderProgram.h:

Source/WebKit:

Use the new TextureMapper::beginClip() method that receives a FloatRoundedRect.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):

LayoutTests:

Update expectations for passing test.

  • platform/gtk/TestExpectations:
2:36 AM Changeset in webkit [270084] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269909 - REGRESSION(r269579) [WPE] Many tests with scrolling flaky after this revision
https://bugs.webkit.org/show_bug.cgi?id=218859

Reviewed by Simon Fraser.

Set scrolling node ID correctly on CoordinatedGraphicsLayer.

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setScrollingNodeID):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2:35 AM Changeset in webkit [270083] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269579 - [GTK][WPE] Scrolling with mouse wheel doesn't work on iframes with async scrolling enabled
https://bugs.webkit.org/show_bug.cgi?id=214179

Reviewed by Žan Doberšek.

Implement ScrollingTree::scrollingNodeForPoint in
ScrollingTreeNicosia. This fixes overflow and iframe scrolling when
async scrolling is enabled on WPE and GTK ports.

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeNicosia.cpp:

(WebCore::collectDescendantLayersAtPoint):
(WebCore::ScrollingTreeNicosia::scrollingNodeForPoint):

  • page/scrolling/nicosia/ScrollingTreeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • platform/graphics/nicosia/NicosiaPlatformLayer.h:

(Nicosia::CompositionLayer::flushState):
(Nicosia::CompositionLayer::accessPending):

2:16 AM Changeset in webkit [270082] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30

Merge r269955 - [WPE][GTK] Update Outlook user agent quirk
https://bugs.webkit.org/show_bug.cgi?id=219049

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-11-18
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Users report that our user agent quirk for Outlook no longer works. Problem is
outlook.live.com has moved to outlook.office.com. Thanks to Adrian Vovk for rebuilding
WebKit to confirm that this patch fixes the issue.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresMacintoshPlatform):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

2:16 AM Changeset in webkit [270081] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

Merge r269620 - [GTK] Crash in WebKit::DropTarget::drop
https://bugs.webkit.org/show_bug.cgi?id=217482

Reviewed by Michael Catanzaro.

If we don't have selection data when drop is called, just return early to let leave continue. Also change
accept() to receive the drop context and position to be set after leaving any previous operation.

  • UIProcess/API/gtk/DropTarget.h:
  • UIProcess/API/gtk/DropTargetGtk3.cpp:

(WebKit::DropTarget::DropTarget):
(WebKit::DropTarget::accept):
(WebKit::DropTarget::drop):

  • UIProcess/API/gtk/DropTargetGtk4.cpp:

(WebKit::DropTarget::DropTarget):
(WebKit::DropTarget::accept):

2:15 AM WebKitGTK/2.30.x edited by Carlos Garcia Campos
(diff)
2:15 AM Changeset in webkit [270080] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

Merge r269505 - [GTK] Application cannot override drag&drop callbacks
https://bugs.webkit.org/show_bug.cgi?id=218562

Patch by Milan Crha <mcrha@redhat.com> on 2020-11-06
Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/DropTargetGtk3.cpp:

(WebKit::DropTarget::DropTarget): Use g_signal_connect_after(), thus
any descendants can override the callbacks.
(WebKit::DropTarget::didPerformAction): Always call gdk_drag_status(),
to have gtk+ notified about drag progress.

2:15 AM Changeset in webkit [270079] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

Merge r269504 - [GTK] dlopen libWPEBackend-fdo-1.0.so.1 instead of libWPEBackend-fdo-1.0.so
https://bugs.webkit.org/show_bug.cgi?id=218584

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-11-06
Reviewed by Carlos Garcia Campos.

wpe_loader_init() tries to dlopen a development symlink, but these will not usually be
installed. It only works in the GNOME flatpak runtime because we don't use devel split
rules in the GNOME runtime, but we really ought to, and freedesktop-sdk already does, so
it's going to break upstream too once that gets implemented. It's easier for everyone if
we tackle this now. Since all major distros except Arch Linux use devel split, this patch
is really required for almost every distro to use WPE renderer.

The downside is that this makes it harder to update the wpebackend-fdo library version,
since minor changes there will now unnecessarily break WebKit. This is not good, but it's
better than forcing distros to apply this same patch downstream. I considered trying a bunch
of different library versions in a loop in order to maximize the chance of success in case
the wpebackend-fdo library version increases in the future, but it's probably nicer to just
be careful about not changing its library version until we find a better solution for this.

  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess):

2:15 AM Changeset in webkit [270078] by Carlos Garcia Campos
  • 9 edits
    4 adds
    2 deletes in releases/WebKitGTK/webkit-2.30

Merge r269436 - Consider blocking ports 5060 and 5061
https://bugs.webkit.org/show_bug.cgi?id=218557
<rdar://problem/71031479>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/request/request-bad-port.any-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-bad-port.any.html: Added.
  • web-platform-tests/fetch/api/request/request-bad-port.any.js: Added.

(BLOCKED_PORTS_LIST.map):

  • web-platform-tests/fetch/api/request/request-bad-port.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-bad-port.any.worker.html: Added.
  • web-platform-tests/fetch/api/request/request-bad-port.html: Removed.
  • web-platform-tests/tools/wptserve/wptserve/utils.py:

(is_bad_port):

  • web-platform-tests/websockets/Create-blocked-port.any-expected.txt:
  • web-platform-tests/websockets/Create-blocked-port.any.js:
  • web-platform-tests/websockets/Create-blocked-port.any.worker-expected.txt:

Source/WTF:

  • wtf/URL.cpp:

(WTF::portAllowed):

LayoutTests:

2:14 AM Changeset in webkit [270077] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30

Merge r269586 - Enable llint asm on aarch64 when USE(64KB_PAGE_BLOCK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=218613

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-11-09
Reviewed by Carlos Alberto Lopez Perez.

Normally we fall back to cloop when JIT is not supported. But on aarch64, llint asm is well-
supported, so it is safe to use that here. This will only happen on aarch64, and only when
USE(64KB_PAGE_BLOCK) is enabled, which should probably only be used by RHEL and SUSE.
Everyone else should get the JIT.

  • Source/cmake/WebKitFeatures.cmake:
2:14 AM Changeset in webkit [270076] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30

Merge r269396 - Add new build option USE(64KB_PAGE_BLOCK)
https://bugs.webkit.org/show_bug.cgi?id=217989

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-11-04
Reviewed by Yusuke Suzuki.

.:

Why do we need this option? Because JSC and bmalloc both want to know the userspace page
size at compile time, which is impossible on Linux because it's a runtime setting. We
cannot test the system page size at build time in hopes that it will be the same on the
target system, because (a) cross compiling wouldn't work, and (b) the build system could
use a different page size than the target system (which will be true for Fedora aarch64,
because Fedora is built using RHEL), so the best we can do is guess based on the target CPU
architecture. In practice, guessing works for all architectures except aarch64 (unless
unusual page sizes are used), but it fails for aarch64 because distros are split between
using 4 KB and 64 KB pages there. Most distros (including Fedora) use 4 KB, but RHEL uses
64 KB. SUSE actually supports both. Since there is no way to guess correctly, the best we
can do is provide an option for it. You should probably only use this if building for
aarch64. Otherwise, known CPUs except PowerPC will use 4 KB, while PowerPC and unknown CPUs
will use 64 KB (see wtf/PageBlock.h). aarch64 will continue to default to 4 KB because this
is a much better default on systems where it doesn't crash.

Having one flag will help avoid mistakes. E.g. both RHEL and SUSE were manually passing
-DENABLE_JIT=OFF and -DUSE_SYSTEM_MALLOC=ON, but we missed -DENABLE_C_LOOP=ON and
-DENABLE_SAMPLING_PROFILER=OFF, so wound up running with both JIT and cloop disabled, a
configuration not otherwise used on Linux (and not supported by GTK or WPE ports). It will
be easier to not mess up if we only have to pass one special build option. This will also
allow us to stop patching PageBlock.h downstream, because I don't like downstream patches
that we have to keep forever.

  • Source/cmake/WebKitFeatures.cmake:

Source/WTF:

  • wtf/PageBlock.h:
2:14 AM Changeset in webkit [270075] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r269948 - Unreviewed. Fix the build with GCC 10

Add a temporary workaround for a GCC 10 bug.

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

1:40 AM Changeset in webkit [270074] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] Migrate WebKitTestServer to libsoup 2.48 API
https://bugs.webkit.org/show_bug.cgi?id=219160

Patch by Frederic Wang <fwang@igalia.com> on 2020-11-20
Reviewed by Carlos Garcia Campos.

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:

(WebKitTestServer::WebKitTestServer): SOUP_SERVER_INTERFACE and soup_server_get_port are
deprecated. The libsoup doc recommends to use soup_server_listen* and soup_server_get_uris
instead. Existing code uses 127.0.0.1 (https or http) which corresponds to calling
soup_server_listen_local with thIPV4_ONLY (and HTTPS or HTTP) option.

1:33 AM Changeset in webkit [270073] by svillar@igalia.com
  • 8 edits in trunk

[css-flex] Images as flex items should use the overridingLogicalHeight when defined to compute the logical width
https://bugs.webkit.org/show_bug.cgi?id=218975

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Replaced 19 FAIL by PASS expectations.

  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-001v-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-002-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-005v-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-006-expected.txt:
  • web-platform-tests/css/css-flexbox/image-as-flexitem-size-007v-expected.txt:

Source/WebCore:

RenderReplaced should use the overridingLogicalHeight whenever defined instead of the specified logical height to compute the logical
width using an intrinsic aspect ratio. The overriding height is set by flex containers that need to stretch/shrink their items.
The current code was not considering this case and thus, the intrinsic (non-stretched) logical height was used to compute the logical width,
meaning that the stretching set by the flexbox container was ignored.

Note that it isn't enough to check that there is an overriding height, we must also check that the replaced element has an intrinsic size.
Replaced elements with intrinsic ratios but without intrinsic sizes are handled in a separate code path (it's actually undefined behaviour).
That's why it isn't enough to verify that the element has an aspect ratio, because most SVG graphics actually have defined intrinsic ratios
but not intrinsic sizes.

This allows us to pass an additional 19 subtests in 5 flexbox WPT tests.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeReplacedLogicalWidth const): Use the overriding logical height if defined in presence of a valid aspect ratio.

Note: See TracTimeline for information about the timeline view.