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

Timeline



Oct 4, 2020:

11:57 PM Changeset in webkit [267956] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

DataTransfer.setDragImage takes a non nullable Element parameter
https://bugs.webkit.org/show_bug.cgi?id=217283

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-04
Reviewed by Sam Weinig.

Source/WebCore:

DataTransfer.setDragImage takes a non nullable Element parameter [1].

Behavior matches Firefox and Chrome.

Test: fast/events/setDragImage-element-non-nullable.html

[1] https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdragimage

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::setDragImage):

  • dom/DataTransfer.h:
  • dom/DataTransfer.idl:
  • page/EventHandler.cpp:

(WebCore::EventHandler::handleDrag):

LayoutTests:

Add test to verify DataTransfer.setDragImage throws if a null
is passed for the Element parameter.

  • fast/events/setDragImage-element-non-nullable-expected.txt: Added.
  • fast/events/setDragImage-element-non-nullable.html: Added.
  • platform/ios/TestExpectations:
9:40 PM Changeset in webkit [267955] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][Floats] Do not assert when right aligned float overflows the containing block on the left
https://bugs.webkit.org/show_bug.cgi?id=217305

Reviewed by Antti Koivisto.

Source/WebCore:

It's okay for a float: right; to overflow the containing block on the left.
In such cases let's just constrain the logical right value by the logical left edge.

Test: fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space.html

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::constraintsForLine):

LayoutTests:

  • fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space-expected.html: Added.
  • fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space.html: Added.
9:19 PM Changeset in webkit [267954] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[curl] WebSocket tests are failing since r267931
https://bugs.webkit.org/show_bug.cgi?id=217298

Reviewed by Darin Adler.

"http:" is a invalid URL since r267931. Change the way how to
construct a URL for libcurl.

  • platform/network/curl/CurlStream.cpp:

(WebCore::CurlStream::CurlStream): Construct the URL just by
replacing the scheme part. Removed a local variable
urlForConnection.

9:00 PM Changeset in webkit [267953] by weinig@apple.com
  • 21 edits in trunk/Source/WebCore

[WebIDL] Address consistency around [SameObject] extended attributes
https://bugs.webkit.org/show_bug.cgi?id=217303

Reviewed by Darin Adler.

There isn't any real value in keeping comments around in the IDLs saying:

FIXME: Add [SameObject] once it is supported

It's unclear what we would want the bindings generator to do with [SameObject],
perhaps for wrapper types, assert if the implementation doesn't return the same
object each time in a debug build, perhaps error out if a non-wrapper type doesn't
also have CachedAttribute or maybe just have SameObject imply it. Regardless,
in the mean time, there is no harm in just annotating the types with the attribute
and letting the generator do nothing while we think.

  • Modules/fetch/FetchRequest.idl:
  • Modules/fetch/FetchResponse.idl:
  • Modules/mediastream/MediaStreamTrackEvent.idl:
  • css/DocumentOrShadowRoot+CSSOM.idl:
  • css/ElementCSSInlineStyle.idl:
  • dom/DOMQuad.idl:
  • dom/DataTransfer.idl:
  • dom/Document+HTML.idl:
  • dom/Document+HTMLObsolete.idl:
  • dom/Document.idl:
  • dom/Element.idl:
  • dom/MutationRecord.idl:
  • dom/Node.idl:
  • dom/NodeIterator.idl:
  • dom/ParentNode.idl:
  • dom/TreeWalker.idl:
  • html/HTMLOrForeignElement.idl:
  • html/HTMLSelectElement.idl:
  • page/Location.idl:
  • svg/SVGFitToViewBox.idl:
8:25 PM Changeset in webkit [267952] by Lauro Moura
  • 3 edits in trunk/Source/WebKit

webkitpy: Update messages reference files after r267916
https://bugs.webkit.org/show_bug.cgi?id=217304

Reviewed by Simon Fraser.

Covered by existing tests.

  • Scripts/test-legacyMessageReceiver.cpp:
  • Scripts/testMessageReceiver.cpp:
5:28 PM Changeset in webkit [267951] by commit-queue@webkit.org
  • 5 edits
    7 adds in trunk

Presence of CSS variable causes a background url() to get resolved with a different base
https://bugs.webkit.org/show_bug.cgi?id=198512

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-10-04
Reviewed by Darin Adler.

Source/WebCore:

Prior to this patch, url()s within CSSPendingSubstitutionValues
were resolved relative to the document root rather than the stylesheet
they were created from, which is wrong.

With this patch, when CSSPendingSubstitutionValues are created, they
now store the base URL that should be used when they are later
resolved in StyleBuilder.

Test: fast/css/variables/url-with-variable-is-sheet-relative.html

  • css/CSSPendingSubstitutionValue.h: Store baseURL for later

resolution.
(WebCore::CSSPendingSubstitutionValue::create): Add baseURL
parameter.
(WebCore::CSSPendingSubstitutionValue::baseURL const): Add m_baseURL
getter.
(WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
Add baseURL parameter.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseValueStart): When creating a
CSSPendingSubstitutionValue, also pass along the baseURL from this
context for later resolution.

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::resolvedVariableValue): If the value
we are resolving is a CSSPendingSubstitutionValue, resolve it
relative to the baseURL it has stored.

LayoutTests:

Add test ensuring shorthands containing url() and CSS variable(s)
resolve the url() relative to the stylesheet the rule is present in,
not the document root.

  • fast/css/variables/support/images/600x600-green-square.png: Added.
  • fast/css/variables/support/styles/url-with-variable-is-sheet-relative.css: Added.
  • fast/css/variables/url-with-variable-is-sheet-relative-expected.html: Added.
  • fast/css/variables/url-with-variable-is-sheet-relative.html: Added.
2:47 PM Changeset in webkit [267950] by BJ Burg
  • 9 edits in trunk

[Cocoa] Add WKUIDelegate SPI to inform clients when a _WKInspector is about to close
https://bugs.webkit.org/show_bug.cgi?id=217233

Reviewed by Timothy Hatcher and Devin Rousso.

Source/WebKit:

This is complementary to _webView:didAttachLocalInspector: and works similarly.
Clients need to be careful in depending on this during teardown, because it won't
come if the UIDelegate has already been cleared out while the inspected page is being closed.

API test: WKInspectorDelegate.WillCloseLocalInspector

  • UIProcess/API/APIUIClient.h:

(API::UIClient::willCloseLocalInspector):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::willCloseLocalInspector):

  • UIProcess/Inspector/WebInspectorProxy.h:
  • UIProcess/Inspector/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::closeFrontendPageAndWindow):
Add a guard for reentrant calls to close().

Tools:

Add new test case for -_webView:willCloseLocalInspector:.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(-[InspectorDelegate inspectorDidEnableBrowserDomain:]):
(-[UIDelegate _webView:didAttachLocalInspector:]):
(-[UIDelegate _webView:willCloseLocalInspector:]):
(TEST):
Clean up how the other test case works so we don't call close from
inside a delegate callback. Let's keep our tests structured the same way.

2:09 PM Changeset in webkit [267949] by commit-queue@webkit.org
  • 10 edits in trunk

Submission failure with "make: * No rule to make target `installsrc'. Stop"
https://bugs.webkit.org/show_bug.cgi?id=214696
<rdar://problem/62268104>

Patch by Ryan Hostetler <rhost@apple.com> on 2020-10-04
Reviewed by Darin Adler.

.:

Add installsrc phase to support xbs submitproject for WebKit repository.
This change allows internal tools to submit and build in a single step.

  • Makefile:
  • Makefile.shared:
  • Source/Makefile:

Source/ThirdParty:

Add installsrc phase to support xbs submitproject for WebKit repository.
This change allows internal tools to submit and build in a single step.

  • Makefile:

Tools:

Add support for XBS single base project build for WebKit repository.
This change allows internal tools to submit and build from the repository root in a single step.

  • Makefile:

Tools does not need to be submitted, so we stub out the installsrc phase.

WebKitLibraries:

Add support for XBS single base project build for WebKit repository.
This change allows internal tools to submit and build from the repository root in a single step.

  • Makefile:

WebKitLibraries do not need to be submitted, so we stub out the installsrc phase.

10:06 AM Changeset in webkit [267948] by Alan Bujtas
  • 4 edits
    1 add
    2 deletes in trunk

[LFC][Integration] Enable soft hyphen
https://bugs.webkit.org/show_bug.cgi?id=217293

Reviewed by Antti Koivisto.

Source/WebCore:

Let's expand IFC coverage with soft hyphen rendering.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForText):

LayoutTests:

  • fast/parser/entities-in-html-expected.txt: Progression? Now soft hyphen "renders".
  • fast/text/softHyphen-expected.html: Added. Text-dumping soft hyphens seems defective in some cases.

In this test case there should not be any hyphenation triggered by soft hyphens,
so let's use a reftest instead (which should have been used the first place).

  • platform/mac/fast/text/softHyphen-expected.png: Removed.
  • platform/mac/fast/text/softHyphen-expected.txt: Removed.
9:12 AM Changeset in webkit [267947] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Fix the case when the first content overflows with hyphen
https://bugs.webkit.org/show_bug.cgi?id=217295

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

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

[LFC][IFC] Remove Line::appendPartialTrailingTextItem special case
https://bugs.webkit.org/show_bug.cgi?id=217287

Reviewed by Antti Koivisto.

Use the newly added Line::addTrailingHyphen to display hyphen for partial content.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::appendPartialTrailingTextItem): Deleted.
(WebCore::Layout::Line::appendWith): Deleted.

  • layout/inlineformatting/InlineLine.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::commitPartialContent):

  • layout/inlineformatting/InlineLineRun.h:

(WebCore::Layout::LineRun::Text::Text):

5:22 AM Changeset in webkit [267945] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Reset Line::m_trailingSoftHyphenWidth when the text content does not end with a soft hyphen
https://bugs.webkit.org/show_bug.cgi?id=217292

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendTextContent):

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

[LFC][IFC][Soft hyphen] endsWithSoftWrapOpportunity should check if hyphenation is disabled
https://bugs.webkit.org/show_bug.cgi?id=217288

Reviewed by Antti Koivisto.

This is very similar InlineTextItem::createAndAppendTextItems where we
also construct a LazyLineBreakIterator to check for word wrap opportunities.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::isTextContent): The trailing "only" is misleading since we can't have a mixture of text and non-text content
within a continuous content (there's always a word wrap opportunity between a text and a non-text content).
(WebCore::Layout::isVisuallyEmptyWhitespaceContent):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::isTextContentOnly): Deleted.
(WebCore::Layout::isVisuallyEmptyWhitespaceContentOnly): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):

4:37 AM Changeset in webkit [267943] by Adrian Perez de Castro
  • 19 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r267934 - [GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Remove USE(LIBWEBRTC) guards from media stream code, as it does not actually
depend on libwebrtc and can be built by itself. This allows using e.g. live
audio recording inputs with WebAudio.

Reviewed by Philippe Normand.

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.h:
  • platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerCapturer.h:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.h:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
  • platform/mock/MockRealtimeAudioSource.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:
4:37 AM WebKitGTK/2.30.x edited by Adrian Perez de Castro
(diff)
4:37 AM Changeset in webkit [267942] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.30

Merge r267882 - [GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Reviewed by Philippe Normand.

.:

  • Source/cmake/GStreamerChecks.cmake: Only enable USE_LIBWEBRTC when both

ENABLE_MEDIA_STREAM and ENABLE_WEB_RTC is defined. This prevents trying to
build code that uses libwebrtc types when ENABLE_WEB_RTC is disabled but
ENABLE_MEDIA_STREAM is enabled.

Source/WebCore:

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioData.h: Remove USE(LIBWEBRTC) guard, as

there is nothing specific to WebRTC in this file, and it is needed when building with
ENABLE_MEDIA_STREAM enabled.

4:34 AM WebKitGTK/2.30.x edited by Adrian Perez de Castro
(diff)
1:16 AM Changeset in webkit [267941] by youenn@apple.com
  • 10 edits in trunk

Make sure MediaRecorder does not call fetchData until the last fetchData is completed
https://bugs.webkit.org/show_bug.cgi?id=217276

Reviewed by Darin Adler.

Source/WebCore:

When fetchData is called while an existing fetchData is inflight, enqueue the callback in a deque.
When the inflight fetchData completes, call the enqueued callbacks in order with a null blob.

Add ASSERT in MediaRecorderPrivateWriter to make sure we do not call requestMediaDataWhenReadyOnQueue too many times.

Covered by updated http/wpt/mediarecorder/MediaRecorder-dataavailable.html.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::stopRecording):
(WebCore::MediaRecorder::requestData):
Do not enable the timer if MediaRecorder is not active as a small optimization.
(WebCore::MediaRecorder::fetchData):

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::fetchData):

  • platform/mediarecorder/MediaRecorderPrivateMock.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):

LayoutTests:

Add test to cover patch
Update some test expectations according bot results.

  • http/wpt/mediarecorder/MediaRecorder-dataavailable-expected.txt:
  • http/wpt/mediarecorder/MediaRecorder-dataavailable.html:
  • platform/mac/TestExpectations:

Oct 3, 2020:

6:58 PM Changeset in webkit [267940] by Oriol Brufau
  • 25 edits
    2 adds
    2 deletes in trunk

[css-lists] Implement list-style-type: <string>
https://bugs.webkit.org/show_bug.cgi?id=167729

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations, and await document.fonts.ready in a test with Ahem.

  • web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt:
  • web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001.html:

Source/WebCore:

This patch extends the syntax of the list-style-type property to accept
arbitrary string values in order to customize the marker contents.
When a string is specified for list-style-type, the patch sets it to a
special ListStyleType::String, and the string value is stored in an
extra field.

It's a reland of r252076, which got reverted because in some platform
the number of bitfields in GreaterThanOrSameSizeAsStyleRareInheritedData
was actually smaller than in StyleRareInheritedData, due to padding
differences. Hopefully this will no longer be an issue.

Tests: imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html

imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html
imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html
imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html
imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html
imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html
imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing.html
imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001.html

Some tests fail because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSProperties.json:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isPartialKeywordPropertyID):

  • css/parser/CSSParserFastPaths.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • rendering/RenderListMarker.cpp:

(WebCore::effectiveListMarkerType):
(WebCore::listMarkerSuffix):
(WebCore::listMarkerText):
(WebCore::RenderListMarker::styleDidChange):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::suffix const):
(WebCore::RenderListMarker::getRelativeMarkerRect):

  • rendering/style/CounterContent.h:

(WebCore::CounterContent::CounterContent):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::listStyleStringValue const):
(WebCore::RenderStyle::setListStyleStringValue):
(WebCore::RenderStyle::initialListStyleStringValue):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInheritListStyleType):
(WebCore::Style::BuilderCustom::applyInitialListStyleType):
(WebCore::Style::BuilderCustom::applyValueListStyleType):

LayoutTests:

Most tests for 'list-style-type: <string>' pass now, but some still fail
because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

Various tests for the 'content' property in ::marker fail now. This is
expected because they were only passing by chance, since ::marker does
not support 'content' (https://bugs.webkit.org/show_bug.cgi?id=204163).

iOS and Mac have some extra failures due to subpixel differences for the
marker position.

  • TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt: Removed.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt: Removed.
5:34 PM Changeset in webkit [267939] by commit-queue@webkit.org
  • 21 edits in trunk

Add onslotchange on ShadowRoot and GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=191310

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-10-03
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaselined tests to pass more test cases.

  • web-platform-tests/dom/idlharness.window-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:
  • web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:

Source/WebCore:

onslotchange attribute has been added to ShadowRoot and
GlobalEventHandlers by https://github.com/whatwg/html/issues/3487

This patch supports it.

Tests: imported/w3c/web-platform-tests/dom/idlharness.window.html:

imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html
imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html

  • dom/GlobalEventHandlers.idl:
  • dom/ShadowRoot.idl:
  • html/HTMLAttributeNames.in:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

Rebaselined tests to pass more test cases.

  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
4:51 PM Changeset in webkit [267938] by ysuzuki@apple.com
  • 60 edits
    4 copies
    2 adds in trunk/Source

[JSC] Introduce JITOperationList to validate JIT-caged pointers
https://bugs.webkit.org/show_bug.cgi?id=217261

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch adds JITOperationList, which manages all the host-function & jit-operation pointers.
And we can now query whether the given pointer is registered in this table.
Currently, as a test, we are verifying that host-function is registered in this table when creating NativeExecutable in debug build.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/JITOperationList.cpp: Added.

(JSC::JITOperationList::initialize):
(JSC::addPointers):
(JSC::JITOperationList::populatePointersInJavaScriptCore):
(JSC::JITOperationList::populatePointersInEmbedder):

  • assembler/JITOperationList.h: Added.

(JSC::JITOperationList::contains const):
(JSC::JITOperationList::assertIsHostFunction):
(JSC::JITOperationList::assertIsJITOperation):
(JSC::JITOperationList::instance):

  • assembler/MacroAssemblerARM64.cpp:
  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerMIPS.cpp:
  • assembler/MacroAssemblerX86Common.cpp:
  • jsc.cpp:

(jscmain):

  • runtime/InitializeThreading.cpp:

(JSC::initialize):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncCopyWithin):
(JSC::genericTypedArrayViewProtoFuncIncludes):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewProtoGetterFuncBuffer):
(JSC::genericTypedArrayViewProtoGetterFuncLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteOffset):
(JSC::genericTypedArrayViewProtoFuncReverse):
(JSC::genericTypedArrayViewPrivateFuncSort):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
(JSC::JSC_DEFINE_HOST_FUNCTION): Deleted.

  • runtime/VM.cpp:

(JSC::VM::getHostFunction):

Source/WebCore:

We should have WebCore::initialize(). It is filed in https://bugs.webkit.org/show_bug.cgi?id=217270.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMBuiltinConstructor.h:
  • bindings/js/JSDOMConstructor.h:
  • bindings/js/JSDOMLegacyFactoryFunction.h:
  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::initializeMainThread):

  • bindings/js/WebCoreJITOperations.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.

(WebCore::populateJITOperations):

  • bindings/js/WebCoreJITOperations.h: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDefinitions):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bridge/objc/WebScriptObject.mm:

(+[WebScriptObject initialize]):

  • domjit/JSDocumentDOMJIT.cpp:
  • platform/cocoa/SharedBufferCocoa.mm:

(+[WebCoreSharedBufferData initialize]):

  • platform/ios/wak/WebCoreThread.mm:

(RunWebThread):

Source/WebKit:

  • Shared/API/c/WKString.cpp:

(WKStringCopyJSString):

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::runInitializationCode):

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

  • Shared/WebKitJITOperations.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.

(WebKit::populateJITOperations):

  • Shared/WebKitJITOperations.h: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • History/WebBackForwardList.mm:

(+[WebBackForwardList initialize]):

  • History/WebHistoryItem.mm:

(+[WebHistoryItem initialize]):

  • Misc/WebCache.mm:

(+[WebCache initialize]):

  • Misc/WebElementDictionary.mm:

(+[WebElementDictionary initialize]):

  • Misc/WebIconDatabase.mm:
  • Misc/WebStringTruncator.mm:

(+[WebStringTruncator initialize]):

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(+[WebHostedNetscapePluginView initialize]):

  • Plugins/WebBaseNetscapePluginView.mm:
  • Plugins/WebBasePluginPackage.mm:

(+[WebBasePluginPackage initialize]):

  • Plugins/WebNetscapePluginView.mm:

(+[WebNetscapePluginView initialize]):

  • WebCoreSupport/WebEditorClient.mm:

(+[WebUndoStep initialize]):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(+[WebFramePolicyListener initialize]):

  • WebView/WebArchive.mm:

(+[WebArchivePrivate initialize]):

  • WebView/WebDataSource.mm:

(+[WebDataSource initialize]):

  • WebView/WebHTMLView.mm:

(+[WebHTMLViewPrivate initialize]):
(+[WebHTMLView initialize]):

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebResource.mm:

(+[WebResourcePrivate initialize]):

  • WebView/WebTextIterator.mm:

(+[WebTextIteratorPrivate initialize]):

  • WebView/WebView.mm:

(+[WebView initialize]):

  • WebView/WebViewData.mm:

(+[WebViewPrivate initialize]):

Source/WebKitLegacy/win:

  • WebKitClassFactory.cpp:

(WebKitClassFactory::WebKitClassFactory):

  • WebView.cpp:

(WebView::WebView):

Source/WTF:

  • wtf/PlatformCallingConventions.h:
  • wtf/PlatformEnable.h:
3:07 PM Changeset in webkit [267937] by graouts@webkit.org
  • 28 edits
    10 adds in trunk

Add non-animated support for the CSS translate property
https://bugs.webkit.org/show_bug.cgi?id=216997
<rdar://problem/69597083>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

WPT progressions showing the correct parsing and computed style output of a non-animated "translate" property.
We are also adding some more tests to the invalid "translate" parsing to check that we bail once we get junk
for optional values after valid values.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

We add non-animated support for the CSS "translate" property as specifed in by the CSS Transforms Level 2
specification (​https://drafts.csswg.org/css-transforms-2/#propdef-translate).

Tests: transforms/2d/translate-and-transform-attribute-in-svg-expected.svg

transforms/2d/translate-and-transform-attribute-in-svg.svg
transforms/2d/translate-and-transform-css-property-in-svg-expected.svg
transforms/2d/translate-and-transform-css-property-in-svg.svg
transforms/2d/translate-in-svg-expected.svg
transforms/2d/translate-in-svg.svg
transforms/2d/translate-transform-order.html
transforms/2d/translate-transform-origin-order.html

  • Headers.cmake:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::rendererCanBeTransformed):
(WebCore::computedTransform):
(WebCore::computedTranslate): Create a CSSValueList to print out the computed value for the "translate" property.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json: Define the "translate" property with the condition that the runtime setting for individual

CSS transform properties is set.

  • css/TransformFunctions.cpp:

(WebCore::translateForValue): Convert a CSSValue to a TranslateTransformOperation when parsing a "translate" property value.

  • css/TransformFunctions.h:
  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext): Add a new flag indicating whether the runtime setting for individual
CSS transform properties is set.
(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTranslate): Create a CSSValueList when parsing a "translate" property value.
(WebCore::CSSPropertyParser::parseSingleValue):

  • platform/graphics/transforms/TranslateTransformOperation.h: Promote the apply() method to be public so that it can be called

from Style::ComputedStyleExtractor::valueForPropertyInStyle().

  • rendering/RenderObject.h:

(WebCore::RenderObject::hasTransform const): Consider that having the "translate" property is akin to having a "transform" property
in the render tree.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setTranslate):
(WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::translate() value in the right order, after applying the
transform origin, but before applying the main transform.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::translate const):
(WebCore::RenderStyle::hasTransformRelatedProperty const):
(WebCore::RenderStyle::initialTranslate):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertTranslate):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::translate() value when rendering SVG, ensuring
that it is applied before the transform specified by either the "transform" CSS property or SVG attribute.

LayoutTests:

Add tests checking that the "translate" CSS property is applied in the correct order related to
"transform-origin" and "transform" and that it is applied in SVG as well.

  • platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • transforms/2d/translate-and-transform-attribute-in-svg-expected.svg: Added.
  • transforms/2d/translate-and-transform-attribute-in-svg.svg: Added.
  • transforms/2d/translate-and-transform-css-property-in-svg-expected.svg: Added.
  • transforms/2d/translate-and-transform-css-property-in-svg.svg: Added.
  • transforms/2d/translate-in-svg-expected.svg: Added.
  • transforms/2d/translate-in-svg.svg: Added.
  • transforms/2d/translate-transform-order-expected.html: Added.
  • transforms/2d/translate-transform-order.html: Added.
  • transforms/2d/translate-transform-origin-order-expected.html: Added.
  • transforms/2d/translate-transform-origin-order.html: Added.
3:05 PM Changeset in webkit [267936] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] showLayoutTree should group line runs under individual lines
https://bugs.webkit.org/show_bug.cgi?id=217282

Reviewed by Simon Fraser.

Let's improve inline run output by grouping runs:

line at (0.00,0.00) size 0.00x18.00 baseline at (14.00)

text run at (0.00,0.00) size 15.10x18.00 run(0, 2)
text run at (15.10,0.00) size 0.00x18.00 run(0, 1)

line at (0.00,18.00) size 0.00x18.00 baseline at (14.00)

text run at (0.00,0.00) size 39.09x18.00 run(0, 5)

instead of:

line at (0.00,0.00) size 0.00x18.00 baseline at (14.00)
line at (0.00,18.00) size 0.00x18.00 baseline at (14.00)

text run at (0.00,0.00) size 15.10x18.00 run(0, 2)
text run at (15.10,0.00) size 0.00x18.00 run(0, 1)
text run at (0.00,0.00) size 39.09x18.00 run(0, 5)

So that we can tell which run belongs to which line.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputInlineRuns):

2:54 PM Changeset in webkit [267935] by weinig@apple.com
  • 15 edits
    1 move
    20 adds
    2 deletes in trunk/Source/WebCore

[WebIDL] Split more IDL files by spec
https://bugs.webkit.org/show_bug.cgi?id=217279

Reviewed by Darin Adler.

  • Splits out more partial and mixin interfaces from Element, Range, HTMLBodyElement, HTMLImageElement and DOMWindow.
  • Renames HTMLMediaElementAudioOutput.idl to HTMLMediaElement+AudioOutput.idl for consistency with all other partial interfaces.
  • Replace GlobalCrypto and GlobalPerformance with WindowOrWorkerGlobalScope partials as currently speced.
  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.idl:
  • dom/Element+CSSOMView.idl: Added.
  • dom/Element+Fullscreen.idl: Added.
  • dom/Element+PointerEvents.idl: Added.
  • dom/Element+PointerLock.idl: Added.
  • dom/Element.idl:
  • dom/Range+CSSOMView.idl: Added.
  • dom/Range+DOMParsing.idl: Added.
  • dom/Range.idl:
  • html/HTMLBodyElement+Compat.idl: Added.
  • html/HTMLBodyElement.idl:
  • html/HTMLImageElement+CSSOMView.idl: Added.
  • html/HTMLImageElement.idl:
  • html/HTMLMediaElement+AudioOutput.idl: Added.
  • html/HTMLMediaElementAudioOutput.idl: Removed.
  • page/DOMWindow+CSSOM.idl: Added.
  • page/DOMWindow+CSSOMView.idl: Added.
  • page/DOMWindow+Compat.idl: Added.
  • page/DOMWindow+DeviceMotion.idl: Added.
  • page/DOMWindow+DeviceOrientation.idl: Added.
  • page/DOMWindow+RequestIdleCallback.idl: Added.
  • page/DOMWindow+Selection.idl: Added.
  • page/DOMWindow+VisualViewport.idl: Added.
  • page/DOMWindow.idl:
  • page/GlobalCrypto.idl: Removed.
  • page/GlobalPerformance.idl: Removed.
  • page/WindowEventHandlers.idl:
  • page/WindowLocalStorage.idl: Added.
  • page/WindowOrWorkerGlobalScope+Crypto.idl: Added.
  • page/WindowOrWorkerGlobalScope+Performance.idl: Added.
  • page/WindowSessionStorage.idl: Added.
  • workers/WorkerGlobalScope.idl:
2:32 PM Changeset in webkit [267934] by Adrian Perez de Castro
  • 19 edits in trunk/Source/WebCore

[GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Remove USE(LIBWEBRTC) guards from media stream code, as it does not actually
depend on libwebrtc and can be built by itself. This allows using e.g. live
audio recording inputs with WebAudio.

Reviewed by Philippe Normand.

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.h:
  • platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerCapturer.h:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.h:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
  • platform/mock/MockRealtimeAudioSource.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:
2:17 PM Changeset in webkit [267933] by achristensen@apple.com
  • 8 edits in trunk

Add extra slash after empty host copied from base URL if path is also empty
https://bugs.webkit.org/show_bug.cgi?id=217278

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WTF:

  • wtf/URLParser.cpp:

(WTF::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
2:14 PM Changeset in webkit [267932] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Mark the last run on the line when hyphenation is required.
https://bugs.webkit.org/show_bug.cgi?id=217281

Reviewed by Antti Koivisto.

In this patch we turn the trailing soft hyphen into an "real" hyphen when the content requires it.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::addTrailingHyphen):

  • layout/inlineformatting/InlineLine.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

11:39 AM Changeset in webkit [267931] by achristensen@apple.com
  • 12 edits
    1 delete in trunk

"http:" should not be a valid URL
https://bugs.webkit.org/show_bug.cgi?id=217250

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::topOriginURL):
Fix strange code written in r226257 that relied on the ability to assemble URLs starting with the protocol only.

Source/WTF:

Same with https, ws, wss, and for some reason ftp.
This matches the URL specification and Chrome and Firefox.

  • wtf/URLParser.cpp:

(WTF::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

  • platform/mac-wk1/imported/w3c/web-platform-tests/url/failure-expected.txt: Removed.
10:31 AM Changeset in webkit [267930] by mmaxfield@apple.com
  • 18 edits
    5 adds in trunk

[GPU Process] Support drawing text in 2D canvas with font features
https://bugs.webkit.org/show_bug.cgi?id=206118

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch simply serializes all the non-derived data in Font and FontPlatformData.

Serializing a CTFont involves serializing its font descriptor's attributes. However,
there's an extra step for web fonts, since the font descriptor's attributes don't include
the raw bytes of the font file. This was previously being saved in Font, but this patch
moves that into FontPlatformData because of layering, and adds the SharedBuffer to the
serialization routine for web fonts.

Test: fast/canvas/fill-text-with-font-features.html

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::font): Fonts and FontPlatformDatas are supposed to be immutable, so
having a setter for the FontFaceData is incorrect. This object is moved into the constructor
instead.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font): Deleting dead code.

  • platform/graphics/Font.cpp:

(WebCore::Font::setFontFaceData): Deleted.

  • platform/graphics/Font.h:

(WebCore::Font::fontFaceData const): Deleted. Moved to FontPlatformData

  • platform/graphics/FontPlatformData.cpp:

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::creationData const): Moved from Font.

  • platform/graphics/coretext/FontPlatformDataCoreText.cpp:

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): FontCustomPlatformData is a struct, so
there's no need for the m_ prefixes.
(WebCore::createFontCustomPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.h:

(WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto.

Source/WebKit:

Simply serialize and deserialize all the non-derived data in Font and PlatformFontData.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<Font>>::encode):
(IPC::ArgumentCoder<Ref<Font>>::decode):

  • Shared/WebCoreArgumentCoders.h:

LayoutTests:

  • fast/canvas/fill-text-with-font-features-expected.html: Added.
  • fast/canvas/fill-text-with-font-features.html: Added.
  • fast/canvas/resources/FontWithFeatures.ttf: Added.
10:26 AM Changeset in webkit [267929] by Peng Liu
  • 6 edits in trunk/Source/WebKit

[Media in GPU Process] Web process is not allowed to set the AudioSession category
https://bugs.webkit.org/show_bug.cgi?id=217236

Reviewed by Eric Carlson.

We disabled setting the audio session category in the Web process when media is playing
in the GPU Process (r257367). But since RemoteAudioSession and RemoteAudioSessionProxy
are working now in the Web process and GPU process, we need to allow setting the audio
session category in the Web process.

This patch also includes an optimization to reduce the IPC traffic of the audio session
category changes.

  • GPUProcess/media/RemoteAudioSessionProxy.cpp:

(WebKit::RemoteAudioSessionProxy::setCategory):

  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::RemoteAudioSessionProxyManager::setCategoryForProcess):
We need to check the category and policy in RemoteAudioSessionProxy instead of
RemoteAudioSessionProxyManager. Otherwise, the change will be ignored.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::setCategory):
Only send RemoteAudioSessionProxy::SetCategory message if the category or the policy
is changed.

  • WebProcess/GPU/media/RemoteAudioSession.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
Revert the change in r257367.

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

Simplify and harden idl_files.tmp generation
https://bugs.webkit.org/show_bug.cgi?id=217247

Reviewed by Darin Adler.

We sometimes see idl_files.tmp not getting deleted and on the next
compile things failing. Instead of relying on the delete happening,
we now just completely regenerate the file, now renamed to
IDLFileNamesList.txt, each time in one shot.

  • DerivedSources.make:
9:51 AM Changeset in webkit [267927] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Rename InlineContentBreaker::Result::Action::Push to Wrap
https://bugs.webkit.org/show_bug.cgi?id=217273

Reviewed by Antti Koivisto.

"Wrap" is a more suitable name in this context.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::isWrappingAllowed):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):

9:21 AM Changeset in webkit [267926] by Aditya Keerthi
  • 4 edits in trunk

[macOS] Enable date, time, and datetime-local input types
https://bugs.webkit.org/show_bug.cgi?id=217229
<rdar://problem/69882757>

Reviewed by Sam Weinig.

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Update test expectations now that these input types no longer fallback
to text fields. Also removed the test for input type=datetime, as it
has been removed from the spec.

  • TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm:

(-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]):

9:12 AM Changeset in webkit [267925] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Rebuild the line when need to revert to a previous wrap opportunity due to soft hyphens
https://bugs.webkit.org/show_bug.cgi?id=217272

Reviewed by Antti Koivisto.

This patch reverts the line to a previous wrap opportunity where

  1. the trailing soft hyphen fits or
  2. no need for soft hyphen (we reverted back to a non-text inline content, where we don't need a hyphen) or
  3. reverted all the way back to the beginning of the line.

(We still don't paint hyphens at the soft hyphen locations.)

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLine):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

  • layout/inlineformatting/InlineLineBuilder.h:
8:12 AM Changeset in webkit [267924] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] InlineContentBreaker should return Action::Revert when the trailing soft hyphen does not fit
https://bugs.webkit.org/show_bug.cgi?id=217269

Reviewed by Antti Koivisto.

A trailing soft hyphen turns action "Push" to action "Revert" when the hyphen overflows.
e.g <div>1&shy;2&shy;3&shy;4</div>
line has: 123&shy; and when '4' overflows InlineContentBreaker normally returns with Action::Push ('4' is pushed over to the next line).
However Action::Push turns the trailing soft hyphen into a visible hyphen and now we need to check if 'Push' is actually a 'Revert' instead.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::appendWith):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendLineBreak):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::trailingSoftHyphenWidth const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):

8:02 AM Changeset in webkit [267923] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Floating-point math causes shrink-wrapped content to line wrap sometimes
https://bugs.webkit.org/show_bug.cgi?id=217136
<rdar://problem/69801790>

Reviewed by Antti Koivisto.

Since the preferred width computation and the actual inline layout run though different codepaths,
they may compute slightly different content width due to the limited floating point precision.
Use WTF::areEssentiallyEqual when deciding if the content overflows the current line.

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::fitsOnLineIncludingExtraWidth const):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace const):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace const):

7:39 AM Changeset in webkit [267922] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Do not split InlineItems at soft hyphens when hyphenations is disabled
https://bugs.webkit.org/show_bug.cgi?id=217266

Reviewed by Antti Koivisto.

-webkit-hyphens: none; disables hyphenation. Soft hyphens are not wrap opportunities anymore.
<div>1&shy;2&shy;3&shy;4</div> generates one InlineTextItem: [1&shy;2&shy;3&shy;4].

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

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

[LFC][IFC][Soft hyphen] LineBuilder should hold on to all the wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=217265

Reviewed by Antti Koivisto.

This is in preparation for adding support for reverting content when the soft hyphen
overflows the line so as the last wrap opportunity InlineTextItem.
In such cases we need to go further back(front) on the line and revert even more content.
e.g <div>1&shy;2&shy;3&shy;4</div>
Depending on the horizontal constraint the first line may be:
1-
12-
123-
1234
If character '4' overflows the line, we would go with '123-' by reverting to the last wrap opportunity.
However in case of a wide hyphen, '123-' may overflow the line as well and we have to revert
the content further back to e.g. '12-' or even '1-'.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLine):

  • layout/inlineformatting/InlineLineBuilder.h:
6:22 AM Changeset in webkit [267920] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Soft hyphen is always the trailing character
https://bugs.webkit.org/show_bug.cgi?id=217264

Reviewed by Antti Koivisto.

Soft hyphen is a word wrap opportunity. An InlineTextItem can only have one trailing soft hyphen.
e.g <span>before&shy;after</span> generates 2 separate InlineTextItems: [before-][after].

InlineTextItem should be able to tell if it ends with a soft hyphen.

  • layout/inlineformatting/InlineItem.cpp:
  • layout/inlineformatting/InlineItem.h:
  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

  • layout/inlineformatting/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::hasTrailingSoftHyphen const):
(WebCore::Layout::InlineTextItem::createWhitespaceItem):
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
(WebCore::Layout::InlineTextItem::InlineTextItem):
(WebCore::Layout::InlineTextItem::left const):
(WebCore::Layout::InlineTextItem::right const):

Note: See TracTimeline for information about the timeline view.