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.

Note: See TracTimeline for information about the timeline view.