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

Timeline



Jan 30, 2021:

11:52 PM Changeset in webkit [272123] by weinig@apple.com
  • 19 edits
    10 adds
    2 deletes in trunk

Add support for color(rec2020 ...) as part of CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221114

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add some new WPT tests for color(rec2020 ) that will be upstreamed shortly.

  • web-platform-tests/css/css-color/rec2020-001-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-001.html: Added.
  • web-platform-tests/css/css-color/rec2020-002-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-002.html: Added.
  • web-platform-tests/css/css-color/rec2020-003-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-003.html: Added.
  • web-platform-tests/css/css-color/rec2020-004-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-004.html: Added.

Source/WebCore:

  • css/CSSValueKeywords.in:

Add comment to indicate rec2020 is support color function type.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Parse color(rec2020 ) using the existing generic rgb type color function
parsing function.

  • platform/graphics/Color.h:

Remove overly specific comment that listed all the color types that Color
could hold, replacing it with a more generic statement about the functionaly
of ExtendedColor. This avoids needing to update this not very useful comment
everytime we add a new supported color type.

  • platform/graphics/ColorConversion.cpp:

(WebCore::toLinearRec2020):
(WebCore::toRec2020):
(WebCore::toXYZA):

  • platform/graphics/ColorConversion.h:

(WebCore::toLinearRec2020):
(WebCore::toRec2020):
(WebCore::toLinearDisplayP3):
(WebCore::callWithColorType):
Add conversion support for Rec2020, utilizing the Rec2020TransferFunction
for gamma correction. Fix incorrect sorting of toLinearDisplayP3.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):

  • platform/graphics/ColorSerialization.h:

Add serialization support, matching other rgb color() function
types.

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):

  • platform/graphics/ColorSpace.h:

Add Rec2020 as a new ColorSpace.

  • platform/graphics/ColorTransferFunctions.h:

(WebCore::Rec2020TransferFunction::toGammaEncoded):
(WebCore::Rec2020TransferFunction::toLinear):
Add transfer function for Rec2020. Both clamped and unclamped
are implemented, though for now, only the clamped variant is
being used.

  • platform/graphics/ColorTypes.h:

Add Rec2020 and LinearRec2020 types.

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::rec2020ColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):
Add support for the rec2020 as a CoreGraphics color space, where
it is known as kCGColorSpaceITUR_2020.

LayoutTests:

Remove now passing rec2020 tests.

  • fast/css/parsing-a98rgb-colors-expected.txt: Removed.
  • fast/css/parsing-a98rgb-colors.html: Removed.
  • fast/css/parsing-color-function-expected.txt: Added.
  • fast/css/parsing-color-function.html: Added.

Re-write parsing-a98rgb-colors.html to test all rgb types in the color() function as
they all have the same parsing requirements. Color(lab ) must still be parsed separately
as it has a different grammar.

3:35 PM Changeset in webkit [272122] by Darin Adler
  • 13 edits in trunk/Source

Check activeDocumentLoader() for null consistently everywhere
https://bugs.webkit.org/show_bug.cgi?id=221167

Reviewed by Anders Carlsson.

Source/WebCore:

Audited all activeDocumentLoader() calls to see if they check
for null. Many were missing a null check and only a very few had
a good solid reason they don't need one (newly-created frames, basically).

  • dom/Document.cpp:

(WebCore::createCachedResourceLoader): Added.
(WebCore::Document::Document): Use createCachedResourceLoader, which
adds a null check for the active document loader.

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::appendBytes): Added a null check before
calling setMainResourceDataBufferingPolicy. Also tweaked style a bit.
(WebCore::PluginDocument::cancelManualPluginLoad): Added a null check
before calling cancelMainResourceLoad.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::initialRequest const): Deleted.
(WebCore::FrameLoader::originalRequest const): Deleted.

  • loader/FrameLoader.h: Deleted the initialRequest and originalRequest

functions. Both were using activeDocumentLoader() without null checks,
but both also were unused.

  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):
Added null check before calling continueAfterSubstituteDataRequest.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start): Added null check before calling
scheduleArchiveLoad and null check before callling
applicationCacheHost().maybeLoadResource().
(WebCore::ResourceLoader::willSwitchToSubstituteResource): Added
null check inside an assertion.
(WebCore::ResourceLoader::willSendRequestInternal): Added null check
before calling previewConverter and isCommitted.

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::selectCache): Added null check before
calling request.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::print): Added null check before calling isLoading.
(WebCore::DOMWindow::finishedLoading): Added null check before calling
mainDocumentError.

Source/WebKit:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::cancelManualStreamLoad): Added null check before calling
isLoadingMainResource.

Source/WebKitLegacy/mac:

  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::cancelLoadWithError): Added null check before calling
isLoadingMainResource.

2:33 PM Changeset in webkit [272121] by weinig@apple.com
  • 5 edits in trunk/Source/WebCore

Additional cleanup of CSSPropertyParserHelpers
https://bugs.webkit.org/show_bug.cgi?id=221174

Reviewed by Simon Fraser.

  • Added "raw" versions of consumeInteger and consumePositiveInteger.
  • Converted consumePosition and consumeOneOrTwoValuedPosition to use an Optional return value rather than out parameters, using a new PositionCoordinates helper struct.
  • Added consumeNumberOrPercentDividedBy100Raw helper for common patter of supporting eiter a number, or a percentage normalized by dividing it by 100.
  • css/MediaQueryExpression.cpp:
  • css/parser/CSSPropertyParser.cpp:
  • css/parser/CSSPropertyParserHelpers.cpp:
  • css/parser/CSSPropertyParserHelpers.h:
1:27 PM Changeset in webkit [272120] by Antti Koivisto
  • 2 edits in trunk/Source/WTF

Enable visibility aware resource load scheduling
https://bugs.webkit.org/show_bug.cgi?id=221032

Reviewed by Zalan Bujtas.

Performance testing indicates this is a significant speedup in competetive PLT.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
11:51 AM Changeset in webkit [272119] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix after r272071
https://bugs.webkit.org/show_bug.cgi?id=220914

Since WebAssembly.Global can be "immutable", we cannot use Wasm::Global::set when setting an initial value.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

11:34 AM Changeset in webkit [272118] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Line gap metric should apply to all inline boxes
https://bugs.webkit.org/show_bug.cgi?id=221179

Reviewed by Antti Koivisto.

According to the CSS spec (https://www.w3.org/TR/css-inline-3/#inline-height)
when the line-height computes to normal (RenderStyle::lineHeight().isNegative()) and
either text-edge is leading (property is not supported yet, initial value is leading) or
this is the root inline box, the font’s line gap should be taken into account when computing
layout bounds.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):

10:47 AM Changeset in webkit [272117] by Wenson Hsieh
  • 39 edits
    10 deletes in trunk

[macOS] Remove support for image controls
https://bugs.webkit.org/show_bug.cgi?id=221156

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

Rebaseline an imported layout test.

  • web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Source/WebCore:

Remove support for the macOS-only "image controls" codepath. This SPI was intended to be used by Mail years ago,
but was superseded by a custom implementation in Mail; this WebKit functionality has since been unused.

In a subsequent patch, a small subset of the infrastructure for laying out and rendering image controls will
return under a different name, in support of the image extraction accessibility feature.

  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • dom/Node.h:

(WebCore::Node::isPluginElement const):
(WebCore::Node::isImageControlsRootElement const): Deleted.
(WebCore::Node::isImageControlsButtonElement const): Deleted.

  • html/HTMLAttributeNames.in:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::parseAttribute):

Additionally remove support for the webkitimagemenu DOM attribute, which was only respected if the (now-
removed) SPI preference was set.

(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::updateImageControls): Deleted.
(WebCore::HTMLImageElement::tryCreateImageControls): Deleted.
(WebCore::HTMLImageElement::destroyImageControls): Deleted.
(WebCore::HTMLImageElement::hasImageControls const): Deleted.
(WebCore::HTMLImageElement::childShouldCreateRenderer const): Deleted.

  • html/HTMLImageElement.h:

Additionally remove m_experimentalImageMenuEnabled and the associated helper method hasShadowControls() on
HTMLImageElement.

(WebCore::HTMLImageElement::hasShadowControls const): Deleted.

  • html/shadow/ImageControlsRootElement.cpp: Removed.
  • html/shadow/ImageControlsRootElement.h: Removed.
  • html/shadow/mac/ImageControlsButtonElementMac.cpp: Removed.
  • html/shadow/mac/ImageControlsButtonElementMac.h: Removed.
  • html/shadow/mac/ImageControlsRootElementMac.cpp: Removed.
  • html/shadow/mac/ImageControlsRootElementMac.h: Removed.
  • html/shadow/mac/imageControlsMac.css: Removed.
  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::maybeCreateContextMenu):
(WebCore::imageFromImageElementNode): Deleted.
(WebCore::ContextMenuController::showImageControlsMenu): Deleted.

  • page/ContextMenuController.h:
  • platform/ThemeTypes.cpp:

(WebCore::operator<<):

  • platform/ThemeTypes.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::RenderImage):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::imageControlsStyleSheet const): Deleted.
(WebCore::RenderTheme::imageControlsButtonSize const): Deleted.
(WebCore::RenderTheme::imageControlsButtonPositionOffset const): Deleted.
(WebCore::RenderTheme::paintImageControlsButton): Deleted.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::imageControlsStyleSheet const): Deleted.
(WebCore::RenderThemeMac::servicesRolloverButtonCell const): Deleted.
(WebCore::RenderThemeMac::paintImageControlsButton): Deleted.
(WebCore::RenderThemeMac::imageControlsButtonSize const): Deleted.
(WebCore::RenderThemeMac::imageControlsButtonPositionOffset const): Deleted.

Remove these two methods, which were only used to render the now-removed image controls button.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):

  • style/UserAgentStyle.h:

Source/WebKit:

Leave the existing SPI implemented for binary compatability, but make them empty stubs and additionally mark
the property on WKWebViewConfiguration as deprecated.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetImageControlsEnabled):
(WKPreferencesGetImageControlsEnabled):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setupPageConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _imageControlsEnabled]):
(-[WKWebViewConfiguration _setImageControlsEnabled:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Source/WebKitLegacy/mac:

Turn these legacy WebKit SPI methods into empty stubs.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences imageControlsEnabled]):
(-[WebPreferences setImageControlsEnabled:]):

Source/WTF:

Remove this unused WebKit setting.

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

Remove the only layout test for image controls, along with all associated test expectations.

  • fast/images/image-controls-basic.html: Removed.
  • platform/glib/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/gtk/fast/images/images/image-controls-basic-expected.txt: Removed.
  • platform/ios/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/mac-mojave/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/mac/TestExpectations:
  • platform/mac/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/win/TestExpectations:
  • platform/wincairo/fast/images/image-controls-basic-expected.txt: Removed.
4:57 AM Changeset in webkit [272116] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Adjust the line box stretching (quirky) <br> behavior
https://bugs.webkit.org/show_bug.cgi?id=221173

Reviewed by Antti Koivisto.

In quirks mode when the <br> is nested in an inline box (e.g. <span><br></span>) and it's taller than the root inline box, it
may stretch the line box. See InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox for details.

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox const):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::hasAtomicInlineLevelBox const):

4:44 AM Changeset in webkit [272115] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant LineBoxBuilder::isRootLayoutBox function
https://bugs.webkit.org/show_bug.cgi?id=221170

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::isRootLayoutBox const): Change the name to include "layoutBox" to not confuse it with inline boxes.
(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::isRootInlineBox const): Deleted.
(WebCore::Layout::LineBoxBuilder::isRootBox const): Deleted.

12:53 AM Changeset in webkit [272114] by rniwa@webkit.org
  • 7 edits
    3 adds in trunk

StaticRange should keep its start and end containers alive
https://bugs.webkit.org/show_bug.cgi?id=221175

Reviewed by Wenson Hsieh.

Source/WebCore:

Fixed the bug that the root nodes of StaticRange's start and end containers were not kept alive by GC.
To do that, we add them as opaque roots during the marking phase in visitAdditionalChildren.

Test: fast/dom/static-range-gc.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSStaticRangeCustom.cpp:

(WebCore::JSStaticRange::visitAdditionalChildren):

  • dom/StaticRange.cpp:

(WebCore::StaticRange::visitNodesConcurrently const):

  • dom/StaticRange.h:
  • dom/StaticRange.idl:

LayoutTests:

Added a regression test.

  • fast/dom/static-range-gc-expected.txt: Added.
  • fast/dom/static-range-gc.html: Added.

Jan 29, 2021:

9:41 PM Changeset in webkit [272113] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271551. rdar://problem/73473686

Scroll position is lost when homing out and resuming Safari on iOS
https://bugs.webkit.org/show_bug.cgi?id=220676

Reviewed by Tim Horton.

When homing out on iOS, UIKit snapshotting causes multiple web view resizes, which runs
the dynamicViewportSizeUpdate() logic. This can trigger programmatic scrolls via
FrameView::setContentsSize(), which get stored in the scrolling state tree. When
that tree is committed on resume, we then erroneously apply the programmatic
scrolls.

Fix by ignoring requested scroll positions updates when snapshotting, as we do when
we're in the page cache.

  • page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

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

9:41 PM Changeset in webkit [272112] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271515. rdar://problem/73473627

REGRESSION(r269813): PLT5 regressed by 0.5%
https://bugs.webkit.org/show_bug.cgi?id=220652
<rdar://problem/71517335>

Reviewed by Antti Koivisto.

In r269813 we added support for animating more pseudo-elements besides ::after and ::before. However, the only other
pseudo-element we realistically should be supporting animations for at this juncture is ::marker. So instead of
calling Style::TreeResolver::resolvePseudoStyle() for all public pseudo-elements, we call it for ::after, ::before
and ::marker alone.

  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement):

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

9:41 PM Changeset in webkit [272111] by Alan Coon
  • 9 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271507. rdar://problem/73473467

[Cocoa] Strip DataDetectors links when copying content to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=220526
<rdar://problem/71045590>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently, when DataDetectors links are written to the pasteboard when
copied. This is problematic, since clicking on a DataDetector link
outside of a valid context results in an attempt to open an invalid
URL. Instead, DataDetectors links should be stripped when copied.

To remove the link, while preserving any custom styles, the <a> element
created by Data Detection is replaced with a <span> element. Any
attributes and styles added by WebKit are removed as a part of this
transformation.

Tests: editing/pasteboard/copy-paste-data-detected-links.html

CopyRTF.StripsDataDetectedLinks
PasteWebArchive.StripsDataDetectedLinks

  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm: (WebCore::DataDetection::isDataDetectorElement):

Add a helper to check if an element was created through Data Detection.

  • editing/cocoa/HTMLConverter.mm: (HTMLConverter::_addLinkForElement):

Do not add NSLinkAttributeName for DataDetectors links.

(HTMLConverter::_exitElement):

Factor out link creation logic.

  • editing/markup.cpp: (WebCore::StyledMarkupAccumulator::spanReplacementForElement):

Centralize the logic that determines whether or not an element should
be replaced by a <span>. Previously, this only applied to <slot>
elements. Now, it applies to <slot> and DataDetectors links.

(WebCore::StyledMarkupAccumulator::appendStartTag):

If the element was created through DataDetection, append a <span>
rather than an <a>, to drop the link. The DataDetectors and href
attributes are also dropped from the markup string. Finally, remove
the text decoration style that was added by WebKit to style the
DataDetectors link.

(WebCore::StyledMarkupAccumulator::appendEndTag):

Consult shouldReplaceElementWithSpan when appending the end tag.

Tools:

Added API tests to verify DataDetectors links are not preserved when
copying/pasting WebArchives and rich text.

  • TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm: (StripsDataDetectorsLinks):
  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: (StripsDataDetectorsLinks):

LayoutTests:

Added a test which copies content containing two data detected links
and verifies that the links are removed.

  • editing/pasteboard/copy-paste-data-detected-links-expected.txt: Added.
  • editing/pasteboard/copy-paste-data-detected-links.html: Added.

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

9:41 PM Changeset in webkit [272110] by Alan Coon
  • 18 edits in branches/safari-611-branch/Source

Cherry-pick r271503. rdar://problem/73473503

Add a quirk to disable "return to element fullscreen from picture-in-picture" for some sites
https://bugs.webkit.org/show_bug.cgi?id=220606

Reviewed by Eric Carlson.

Source/WebCore:

For iPads, we add the support of "return to element fullscreen from picture-in-picture" in r265562.
Unfortunately, some sites do not set element's styles properly when a video returns to fullscreen
from picture-in-picture. This patch adds a quirk to disable the feature for those sites for now.

  • page/Quirks.cpp: (WebCore::Quirks::blocksReturnToFullscreenFromPictureInPictureQuirk const):
  • page/Quirks.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::setupFullscreen): (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
  • platform/ios/WebVideoFullscreenControllerAVKit.mm: (VideoFullscreenControllerContext::setUpFullscreen):

Source/WebKit:

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
  • UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::blocksReturnToFullscreenFromPictureInPicture const): (WebKit::WebFullScreenManagerProxy::enterFullScreen):
  • UIProcess/WebFullScreenManagerProxy.h:
  • UIProcess/WebFullScreenManagerProxy.messages.in:
  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (-[WKFullScreenWindowController enterFullScreen]): (-[WKFullScreenWindowController didEnterPictureInPicture]):
  • WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::enterFullScreenForElement):
  • WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: (WebKit::InjectedBundlePageFullScreenClient::enterFullScreenForElement):
  • WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
  • WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):

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

9:41 PM Changeset in webkit [272109] by Alan Coon
  • 16 edits
    3 adds in branches/safari-611-branch

Cherry-pick r271459. rdar://problem/73473665

[macOS] "Correct Spelling Automatically" menu items are inconsistent when autocorrect="off"
https://bugs.webkit.org/show_bug.cgi?id=220598
<rdar://problem/71713611>

Reviewed by Tim Horton.

Source/WebCore:

Disable the context menu item to toggle automatic spelling correction, as well as the menu bar item to toggle
automatic spelling correction, in the case where the autocorrect attribute is set to "off". See below for more
details.

Tests: editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item.html

DisableAutomaticSpellingCorrection.AutocorrectAttribute

  • editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::canEnableAutomaticSpellingCorrection const):

Factor out logic for checking the autocorrect attribute into a separate helper function; this is used to
determine whether or not we should enable both the context menu item and menu item in the menu bar.

(WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled):

  • editing/AlternativeTextController.h: (WebCore::AlternativeTextController::UNLESS_ENABLED):
  • editing/Editor.cpp: (WebCore::Editor::canEnableAutomaticSpellingCorrection const):
  • editing/Editor.h:
  • page/ContextMenuController.cpp: (WebCore::ContextMenuController::checkOrEnableIfNeeded const):

Source/WebKit:

Plumb the new canEnableAutomaticSpellingCorrection flag through EditorState to the UI process, where we can
consult it when validating user interface items (namely, the "Correct Spelling Automatically" menu item, which
corresponds to the -toggleAutomaticSpellingCorrection: selector).

  • Shared/EditorState.cpp: (WebKit::EditorState::PostLayoutData::encode const): (WebKit::EditorState::PostLayoutData::decode): (WebKit::operator<<):
  • Shared/EditorState.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::validateUserInterfaceItem):
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getPlatformEditorState const):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/DisableAutomaticSpellingCorrection.mm: Added.

Add a new API test to verify that the NSMenuItem for toggling automatic spelling correction is invalid when
editing inside a form control with autocorrect="off".

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemEnabledCallback):

Add the readonly enabled JS property on context menu items. See the new layout test,
editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item.html, for more information.

LayoutTests:

Add a new API test to verify that the context menu item to toggle "Correct Spelling Automatically" is disabled
when autocorrect="off".

  • editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item-expected.txt: Added.
  • editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item.html: Added.
  • platform/mac-wk1/TestExpectations:

Disable the test in DumpRenderTree, due to lack of support for context menu testing in WebKit1.

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

9:41 PM Changeset in webkit [272108] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271458. rdar://problem/73477098

Web Inspector: RTL content inside elements is reversed and unreadable
https://bugs.webkit.org/show_bug.cgi?id=220241

Patch by Ebrahim Byagowi <ebrahim@gnu.org> on 2021-01-13
Reviewed by BJ Burg.

Use appropiate unicode-bidi value so that it won't reverse RTL text
inside elements.

  • UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom li > span > .html-text-node):

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

9:41 PM Changeset in webkit [272107] by Alan Coon
  • 8 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271414. rdar://problem/73473727

REGRESSION (r265044): [macOS] Safari autocorrects text when typing in login field on amazon.com
https://bugs.webkit.org/show_bug.cgi?id=220556
<rdar://problem/71602937>

Reviewed by Darin Adler.

Source/WebCore:

Add an internal testing hook to ask an input element whether it has disabled spellchecking (except for text
replacement).

  • testing/Internals.cpp: (WebCore::Internals::isSpellcheckDisabledExceptTextReplacement const):
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Restores the implementation of WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled, which was removed in
r265044, with the reasoning that the code was unused. However, Safari still uses this SPI on macOS to prevent
automatic spelling correction from triggering when editing form fields that are AutoFillable.

Test: WebKit.DisableSpellcheck

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled):

Tools:

Add an API test that uses WebKit C API (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled) to disable or
enable spellchecking on input elements.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheck.mm: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheckPlugIn.mm: Added. (-[DisableSpellcheckPlugIn webProcessPlugIn:didCreateBrowserContextController:]): (-[DisableSpellcheckPlugIn webProcessPlugInBrowserContextController:didClearWindowObjectForFrame:inScriptWorld:]): (-[DisableSpellcheckPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):

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

9:41 PM Changeset in webkit [272106] by Alan Coon
  • 3 edits
    3 adds in branches/safari-611-branch

Cherry-pick r271388. rdar://problem/73473676

Safari 14 on 2x display renders NYS DMV page as blurry
https://bugs.webkit.org/show_bug.cgi?id=220528
<rdar://problem/71440246>

Reviewed by Tim Horton.

Source/WebCore:

Certain combinations of nested perspective and transform cause Core Animation to
rasterize at unit scale, which makes layers blurry on Retina displays.

Enable code that was already used on iOS to set layer rasterization scale.

Test: compositing/contents-scale/hidpi-tests/rasterization-scale.html

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::setContentsScale):

LayoutTests:

  • compositing/contents-scale/hidpi-tests/rasterization-scale-expected.html: Added.
  • compositing/contents-scale/hidpi-tests/rasterization-scale.html: Added.

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

9:41 PM Changeset in webkit [272105] by Alan Coon
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271384. rdar://problem/73473494

Crash in pageDidComputePageRects()
https://bugs.webkit.org/show_bug.cgi?id=220518
<rdar://problem/71065870>

Reviewed by Ryosuke Niwa.

Make _printOperation a weak pointer and check it before use.
Since WKPrintingView is ref counted, a reference could still exist
even if _printOperation is nil. Remove the comment as it is not a
justification for a raw pointer.

  • UIProcess/mac/WKPrintingView.h:
  • UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): (-[WKPrintingView _firstPrintedPageNumber]): (-[WKPrintingView _lastPrintedPageNumber]): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView knowsPageRange:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): (-[WKPrintingView drawPageBorderWithSize:]): (-[WKPrintingView rectForPage:]): (-[WKPrintingView locationOfPrintRect:]): (-[WKPrintingView beginDocument]): (-[WKPrintingView endDocument]):

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

9:41 PM Changeset in webkit [272104] by Alan Coon
  • 6 edits in branches/safari-611-branch

Cherry-pick r271379. rdar://problem/73473604

Keep newly created IDBObjectStores in deleted map when IDBTransaction is aborted
https://bugs.webkit.org/show_bug.cgi?id=220483
<rdar://problem/71934293>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-11
Reviewed by Darin Adler.

Source/WebCore:

When an upgrade transaction is aborted, we move objects from m_deletedObjectStores to m_referencedObjectStores
to revert the deletion operation. When updating m_referencedObjectStores, we did not check whether key already
exists (this can happen when an object store gets deleted and a new object store with the same name is
created; see updated layout test). Therefore, some object store in m_referencedObjectStores would be replaced
and destroyed (since m_referencedObjectStores holds unique pointers) when the object store is referenced by JS
object.

Test: storage/indexeddb/modern/abort-objectstore-info.html

  • Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::internalAbort):

LayoutTests:

  • storage/indexeddb/modern/abort-objectstore-info-expected.txt:
  • storage/indexeddb/modern/abort-objectstore-info-private-expected.txt:
  • storage/indexeddb/modern/resources/abort-objectstore-info.js: (prepareDatabase): (secondUpgradeNeeded): (checkState):

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

9:40 PM Changeset in webkit [272103] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271374. rdar://problem/73477142

Web Inspector: add nullptr check for WebInspectorProxy::m_extensionsController
https://bugs.webkit.org/show_bug.cgi?id=220485
<rdar://72496401>

Reviewed by Devin Rousso.

  • UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::frontendLoaded):

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

9:40 PM Changeset in webkit [272102] by Alan Coon
  • 5 edits in branches/safari-611-branch

Cherry-pick r271369. rdar://problem/73473654

WebProcessPool::establishWorkerContextConnectionToNetworkProcess should make sure to remove the selected process from the cache
https://bugs.webkit.org/show_bug.cgi?id=220503

Reviewed by Darin Adler.

Source/WebKit:

In case we reuse an existing web process, make sure to remove it from web process cache.
Covered by API test.

  • UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::addProcessIfPossible): (WebKit::WebProcessCache::addProcess):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

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

9:40 PM Changeset in webkit [272101] by Alan Coon
  • 3 edits
    5 adds in branches/safari-611-branch

Cherry-pick r271368. rdar://problem/73473690

Keep newly created IDBIndex objects in deleted map when IDBTransaction is aborted
https://bugs.webkit.org/show_bug.cgi?id=220489
<rdar://problem/70498831>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-11
Reviewed by Youenn Fablet.

Source/WebCore:

When an upgrade transaction is aborted, we move objects from m_deletedIndexes to m_referencedIndexes to revert
the index deletion operation. When updating m_referencedIndexes, we did not check whether key already exists.
Therefore, some indexes in m_referencedIndexes would be replaced and destroyed (since m_referencedIndexes holds
unique pointers) when the index is still referenced by JS.

Tests: storage/indexeddb/modern/abort-index-info-private.html

storage/indexeddb/modern/abort-index-info.html

  • Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

LayoutTests:

  • storage/indexeddb/modern/abort-index-info-expected.txt: Added.
  • storage/indexeddb/modern/abort-index-info-private-expected.txt: Added.
  • storage/indexeddb/modern/abort-index-info-private.html: Added.
  • storage/indexeddb/modern/abort-index-info.html: Added.
  • storage/indexeddb/modern/resources/abort-index-info.js: Added. (prepareDatabase): (versionChangeSuccessCallback.secondRequest.onerror): (versionChangeSuccessCallback): (secondUpgradeNeeded): (checkState):

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

9:35 PM Changeset in webkit [272100] by Alan Bujtas
  • 20 edits in trunk

[LFC][RenderTreeAsText] Apply the "adjustForTableCells" quirk to line break runs
https://bugs.webkit.org/show_bug.cgi?id=221142

Reviewed by Antti Koivisto.

Source/WebCore:

When the table rows get stretched vertically as individual cells grow, the cell content
gets "aligned" vertically (not to confuse it with the align property) by offsetting each line.
However this offset is removed in the render tree dump for historical reasons.
This patch ensures that the modern line layout runs that we create for line breaks (<br>)
produce the same vertical position as the legacy layout runs.

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

LayoutTests:

  • platform/ios/fast/table/005-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug106795-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug1224-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug20579-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug32205-3-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug82946-2-expected.txt:
  • platform/ios/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
  • platform/mac-catalina/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
  • platform/mac/fast/table/005-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug106795-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug1224-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug20579-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug32205-3-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug82946-2-expected.txt:
  • platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
8:57 PM Changeset in webkit [272099] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Adjust property order of host JSFunction
https://bugs.webkit.org/show_bug.cgi?id=221168

Reviewed by Darin Adler.

JSTests:

  • stress/host-function-property-order.js: Added.

(shouldBe):

Source/JavaScriptCore:

We should first define "length" before "name".
This will be included in upcoming test262 update[1].

[1]: https://github.com/tc39/test262/pull/2921

  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):

7:17 PM Changeset in webkit [272098] by Alan Coon
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.1.14

7:10 PM Changeset in webkit [272097] by Simon Fraser
  • 56 edits in trunk/Source/WebCore

Devirtualize some functions on InputType
https://bugs.webkit.org/show_bug.cgi?id=221121

Reviewed by Yusuke Suzuki .

Virtual functions on InputType show up in Speedometer profiles. We can make
many of these virtual functions non-virtual by just switching on the input type.

  • dom/Element.cpp:
  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::isCheckable): Deleted.

  • html/BaseCheckableInputType.h:
  • html/BaseTextInputType.cpp:

(WebCore::BaseTextInputType::isTextType const): Deleted.

  • html/BaseTextInputType.h:
  • html/ButtonInputType.cpp:

(WebCore::ButtonInputType::isTextButton const): Deleted.

  • html/ButtonInputType.h:
  • html/CheckboxInputType.cpp:

(WebCore::CheckboxInputType::isCheckbox const): Deleted.

  • html/CheckboxInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::isColorControl const): Deleted.

  • html/ColorInputType.h:
  • html/DateInputType.cpp:

(WebCore::DateInputType::isDateField const): Deleted.

  • html/DateInputType.h:
  • html/DateTimeLocalInputType.cpp:

(WebCore::DateTimeLocalInputType::isDateTimeLocalField const): Deleted.

  • html/DateTimeLocalInputType.h:
  • html/EmailInputType.cpp:

(WebCore::EmailInputType::isEmailField const): Deleted.

  • html/EmailInputType.h:
  • html/FileInputType.cpp:

(WebCore::FileInputType::isFileUpload const): Deleted.

  • html/FileInputType.h:
  • html/FormAssociatedElement.h:
  • html/HTMLFormControlElement.h:
  • html/HiddenInputType.cpp:

(WebCore::HiddenInputType::isHiddenType const): Deleted.

  • html/HiddenInputType.h:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::isImageButton const): Deleted.
(WebCore::ImageInputType::isEnumeratable): Deleted.

  • html/ImageInputType.h:
  • html/InputType.cpp:

(WebCore::InputType::isTextType const):
(WebCore::InputType::isTextField const):
(WebCore::InputType::isTextButton const):
(WebCore::InputType::isInteractiveContent const):
(WebCore::InputType::supportLabels const):
(WebCore::InputType::isEnumeratable):
(WebCore::InputType::isCheckable):
(WebCore::InputType::isRangeControl const): Deleted.
(WebCore::InputType::isRadioButton const): Deleted.
(WebCore::InputType::isSearchField const): Deleted.
(WebCore::InputType::isHiddenType const): Deleted.
(WebCore::InputType::isPasswordField const): Deleted.
(WebCore::InputType::isCheckbox const): Deleted.
(WebCore::InputType::isEmailField const): Deleted.
(WebCore::InputType::isFileUpload const): Deleted.
(WebCore::InputType::isImageButton const): Deleted.
(WebCore::InputType::isNumberField const): Deleted.
(WebCore::InputType::isSubmitButton const): Deleted.
(WebCore::InputType::isTelephoneField const): Deleted.
(WebCore::InputType::isURLField const): Deleted.
(WebCore::InputType::isDateField const): Deleted.
(WebCore::InputType::isDateTimeField const): Deleted.
(WebCore::InputType::isDateTimeLocalField const): Deleted.
(WebCore::InputType::isMonthField const): Deleted.
(WebCore::InputType::isTimeField const): Deleted.
(WebCore::InputType::isWeekField const): Deleted.
(WebCore::InputType::isColorControl const): Deleted.

  • html/InputType.h:

(WebCore::InputType::isCheckbox const):
(WebCore::InputType::isColorControl const):
(WebCore::InputType::isDateField const):
(WebCore::InputType::isDateTimeField const):
(WebCore::InputType::isDateTimeLocalField const):
(WebCore::InputType::isEmailField const):
(WebCore::InputType::isFileUpload const):
(WebCore::InputType::isHiddenType const):
(WebCore::InputType::isImageButton const):
(WebCore::InputType::isMonthField const):
(WebCore::InputType::isNumberField const):
(WebCore::InputType::isPasswordField const):
(WebCore::InputType::isRadioButton const):
(WebCore::InputType::isRangeControl const):
(WebCore::InputType::isSearchField const):
(WebCore::InputType::isSubmitButton const):
(WebCore::InputType::isTelephoneField const):
(WebCore::InputType::isTimeField const):
(WebCore::InputType::isURLField const):
(WebCore::InputType::isWeekField const):

  • html/MonthInputType.cpp:

(WebCore::MonthInputType::isMonthField const): Deleted.

  • html/MonthInputType.h:
  • html/NumberInputType.cpp:

(WebCore::NumberInputType::isNumberField const): Deleted.

  • html/NumberInputType.h:
  • html/PasswordInputType.cpp:

(WebCore::PasswordInputType::isPasswordField const): Deleted.

  • html/PasswordInputType.h:
  • html/RadioInputType.cpp:

(WebCore::RadioInputType::isRadioButton const): Deleted.

  • html/RadioInputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::isRangeControl const): Deleted.

  • html/RangeInputType.h:
  • html/ResetInputType.cpp:

(WebCore::ResetInputType::isTextButton const): Deleted.

  • html/ResetInputType.h:
  • html/SearchInputType.cpp:

(WebCore::SearchInputType::isSearchField const): Deleted.

  • html/SearchInputType.h:
  • html/SubmitInputType.cpp:

(WebCore::SubmitInputType::isSubmitButton const): Deleted.
(WebCore::SubmitInputType::isTextButton const): Deleted.

  • html/SubmitInputType.h:
  • html/TelephoneInputType.cpp:

(WebCore::TelephoneInputType::isTelephoneField const): Deleted.

  • html/TelephoneInputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isTextField const): Deleted.

  • html/TextFieldInputType.h:
  • html/TimeInputType.cpp:

(WebCore::TimeInputType::isTimeField const): Deleted.

  • html/TimeInputType.h:
  • html/URLInputType.cpp:

(WebCore::URLInputType::isURLField const): Deleted.

  • html/URLInputType.h:
  • html/WeekInputType.cpp:

(WebCore::WeekInputType::isWeekField const): Deleted.

  • html/WeekInputType.h:
6:39 PM Changeset in webkit [272096] by Megan Gardner
  • 11 edits in trunk/Source

Add plumbing to allow AppHighlights to be restored.
https://bugs.webkit.org/show_bug.cgi?id=221123

Reviewed by Wenson Hsieh.

Source/WebCore:

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::restoreAppHighlights):

  • Modules/highlight/AppHighlightStorage.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _restoreAppHighlights:]):

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

(WebKit::WebPageProxy::restoreAppHighlights):

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

(WebKit::WebPage::restoreAppHighlights):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
6:16 PM Changeset in webkit [272095] by Tadeu Zagallo
  • 5 edits in trunk/Source/WTF

Make check for full HashTables opt-in
https://bugs.webkit.org/show_bug.cgi?id=221166
<rdar://problem/70902458>

Reviewed by Saam Barati and Yusuke Suzuki.

Having the check always on was a regression on Speedometer2, so we only keep it for
the HashMaps in the MetaAllocator.

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::addUniqueForInitialization):
(WTF::KeyTraits>::add):

  • wtf/HashTraits.h:
  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::addFreeSpace):

  • wtf/MetaAllocator.h:
6:13 PM Changeset in webkit [272094] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Update consumeNumberRaw() to return an Optional<double> rather than using a bool/out parameter pattern
https://bugs.webkit.org/show_bug.cgi?id=221164

Reviewed by Darin Adler.

Match modern convention and the other raw consumers by returning a Optional<double>
rather than using the older bool / out parameter pattern.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariationTag):
(WebCore::consumeCubicBezier):
(WebCore::consumeSpringFunction):
(WebCore::consumePerspective):
(WebCore::consumeCursor):
(WebCore::CSSPropertyParser::consumeFlex):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumberRaw):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseOptionalAlpha):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
(WebCore::CSSPropertyParserHelpers::consumeColorWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeLineHeightRaw):

  • css/parser/CSSPropertyParserHelpers.h:
5:52 PM Changeset in webkit [272093] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

[webkitpy] Thread.isAlive was renamed to Thread.is_alive
https://bugs.webkit.org/show_bug.cgi?id=221160

Reviewed by Jonathan Bedard.

Python 2.6 added threading.Thread.is_alive which aliased isAlive. In Python 3.x only
threading.Thread.is_alive is available so use that instead.

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

(Worker._run_test_in_another_thread):

5:25 PM Changeset in webkit [272092] by Alan Coon
  • 1 copy in tags/Safari-611.1.13

Tag Safari-611.1.13.

5:25 PM Changeset in webkit [272091] by Alan Coon
  • 1 delete in tags/Safari-611.1.13

Delete tag.

5:19 PM Changeset in webkit [272090] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source

Cherry-pick r271619. rdar://problem/73461349

REGRESSION(r269865) Mail's context menu when right clicking on a link does not contain correct entries
https://bugs.webkit.org/show_bug.cgi?id=220745

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-19
Reviewed by Tim Horton.

Source/WebCore:

r269865 broke binary compatibility by changing the values of many WebCore::ContextMenuAction values and many WKContextMenuItemTag values,
and not in the same way. In WebContextMenuProxyMac::getContextMenuItem we call NSMenuItem setTag: with the value from WebCore::ContextMenuAction
and mail compares those values with values from WKContextMenuItemTag in our C API. This isn't ideal, but we need to retain binary compatibility.

  • platform/ContextMenuItem.h:

Source/WebKit:

  • Shared/API/c/WKContextMenuItem.cpp: Add a bunch of static_asserts to verify that our binary values correspond to each other and don't change.
  • Shared/API/c/WKContextMenuItemTypes.h:

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

5:16 PM Changeset in webkit [272089] by Beth Dakin
  • 2 edits in trunk/Websites/webkit.org

Remove non-inclusive language from webkit.org/blog-files/css-jit-introduction/html5-single-page-microbenchmark.html
https://bugs.webkit.org/show_bug.cgi?id=221154

Reviewed by Geoffrey Garen.

  • blog-files/css-jit-introduction/html5-single-page-microbenchmark.html:
4:51 PM Changeset in webkit [272088] by Alan Coon
  • 1 copy in tags/Safari-611.1.13

Tag Safari-611.1.13.

4:51 PM Changeset in webkit [272087] by Alan Coon
  • 1 delete in tags/Safari-611.1.13

Delete tag.

4:36 PM Changeset in webkit [272086] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

SourceParseMode should be a member of the JSC::Parser
https://bugs.webkit.org/show_bug.cgi?id=221149

Reviewed by Ross Kirsling.

Right now we pass the SourceParseMode as a argument to many of the
functions in the parser. This patch move it into a member on the
class. This will make it available deeper in the parser, which is
important for implementing top level await.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseModuleSourceElements):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseAsyncFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePropertyMethod):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parseFunctionExpression):
(JSC::Parser<LexerType>::parseAsyncFunctionExpression):
(JSC::Parser<LexerType>::parseArrowFunctionExpression):

  • parser/Parser.h:

(JSC::Parser::sourceParseMode const):
(JSC::Parser<LexerType>::parse):
(JSC::parse):
(JSC::parseFunctionForFunctionConstructor):

4:30 PM Changeset in webkit [272085] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, internal build fix after r272082
https://bugs.webkit.org/show_bug.cgi?id=221147

  • runtime/Options.cpp:

(JSC::canUseJITCage):

4:18 PM Changeset in webkit [272084] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

WebKit doesn't automatically right-align Adlam
https://bugs.webkit.org/show_bug.cgi?id=220885

Reviewed by Alex Christensen.

Source/WTF:

If we want to iterate across code points, we have to actually
iterate across code points instead of iterating across code units.

Test: fast/text/adlam-dir-auto.html

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::defaultWritingDirection):

LayoutTests:

  • fast/text/adlam-dir-auto-expected.html: Added.
  • fast/text/adlam-dir-auto.html: Added.
3:32 PM Changeset in webkit [272083] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

Upgrade motionmark1.1.plan to r272044
https://bugs.webkit.org/show_bug.cgi?id=221148

Reviewed by Said Abou-Hallawa.

r272044 is attempting to address extreme variance in the test.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
3:31 PM Changeset in webkit [272082] by ysuzuki@apple.com
  • 5 edits in trunk/Source

[JSC] Add com.apple.private.securejit entitlement for JITCage
https://bugs.webkit.org/show_bug.cgi?id=221147

Reviewed by Keith Miller.

Source/JavaScriptCore:

Add com.apple.private.securejit only for iOS, used for JITCage.

  • entitlements.plist:
  • runtime/Options.cpp:

(JSC::canUseJITCage):

Source/WebKit:

Add com.apple.private.securejit only for iOS.

  • Scripts/process-entitlements.sh:
3:07 PM Changeset in webkit [272081] by ysuzuki@apple.com
  • 7 edits
    1 add in trunk

[JSC] Fix WebAssembly.Global's error message and support "funcref"
https://bugs.webkit.org/show_bug.cgi?id=221157

Reviewed by Keith Miller.

JSTests:

  • wasm/stress/global-wrong-type.js: Added.

(assert.throws):

LayoutTests/imported/w3c:

We also update test expect files failing after r272074.

  • web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt:

Source/JavaScriptCore:

Since it accepts "anyfunc" and "externref", we should update the error message.
And we should support "funcref" too.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

2:55 PM Changeset in webkit [272080] by ysuzuki@apple.com
  • 8 edits in branches/safari-611-branch/Source/JavaScriptCore

[JSC] Avoid using DirectCall when executable is wasm function
https://bugs.webkit.org/show_bug.cgi?id=221055

Reviewed by Keith Miller.

This is a partial patch from https://bugs.webkit.org/show_bug.cgi?id=220339, which is reverted because of Facebook crash.
For now, we just avoid using DirectCall to wasm functions so that normal Call will be used, and it is efficient. This
patch avoids JetStream2 regression.

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • jit/JITOperations.cpp:

(JSC::virtualForWithFunction):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::create):

Canonical link: https://commits.webkit.org/233420@main

2:55 PM Changeset in webkit [272079] by ysuzuki@apple.com
  • 12 edits in branches/safari-611-branch

Revert "[JSC] DFG/FTL DirectCall need to respect Wasm IC"

This reverts commit a125d083477069e9cb6bebbe6426eea7919499e4.

2:00 PM Changeset in webkit [272078] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r272065.
https://bugs.webkit.org/show_bug.cgi?id=221155

Introduced crash

Reverted changeset:

"[macOS] Add reporting for some syscalls"
https://bugs.webkit.org/show_bug.cgi?id=221135
https://trac.webkit.org/changeset/272065

1:42 PM Changeset in webkit [272077] by Alan Coon
  • 1 copy in tags/Safari-610.4.3.1.6

Tag Safari-610.4.3.1.6.

1:37 PM Changeset in webkit [272076] by Alan Coon
  • 8 edits in branches/safari-610.4.3.1-branch/Source

Versioning.

WebKit-7610.4.3.1.6

1:26 PM Changeset in webkit [272075] by Fujii Hironori
  • 15 edits in trunk/Source/WebCore

Remove unused GraphicsContextGL::Destination enum class
https://bugs.webkit.org/show_bug.cgi?id=221122

Reviewed by Kenneth Russell.

It was used by Chromium port.

  • platform/graphics/GraphicsContextGL.h:

(WebCore::GraphicsContextGL::destination const): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

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

(Nicosia::GCGLANGLELayer::GCGLANGLELayer):

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h:
  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:

(Nicosia::GCGLLayer::GCGLLayer):

  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp:

(WebCore::GraphicsContextGLOpenGLPrivate::GraphicsContextGLOpenGLPrivate):

  • platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Fix a compilation error by renaming texureType to textureTarget.

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:

(WebCore::TextureMapperGCGLPlatformLayer::TextureMapperGCGLPlatformLayer):

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:
12:59 PM Changeset in webkit [272074] by commit-queue@webkit.org
  • 11 edits in trunk

[WASM-References] Enable reference types by default
https://bugs.webkit.org/show_bug.cgi?id=220890

Patch by Dmitry Bezhetskov <dbezhetskov> on 2021-01-29
Reviewed by Yusuke Suzuki.

Enable wasm reference types by default.

Source/JavaScriptCore:

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
12:19 PM Changeset in webkit [272073] by mmaxfield@apple.com
  • 11 edits
    18 adds in trunk

font-stretch is not applied to system-ui
https://bugs.webkit.org/show_bug.cgi?id=221103
<rdar://problem/73719139>

Reviewed by Darin Adler.

Source/WebCore:

We just never hooked it up.

Tests: fast/text/system-font-width-2.html

fast/text/system-font-width-3.html
fast/text/system-font-width-4.html
fast/text/system-font-width-5.html
fast/text/system-font-width-6.html
fast/text/system-font-width-7.html
fast/text/system-font-width-8.html
fast/text/system-font-width-9.html
fast/text/system-font-width.html

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::createSystemUIFont):
(WebCore::SystemFontDatabaseCoreText::createSystemDesignFont):
(WebCore::SystemFontDatabaseCoreText::createTextStyleFont):
(WebCore::SystemFontDatabaseCoreText::createFontByApplyingWeightWidthItalicsAndFallbackBehavior):
(WebCore::mapWeight):
(WebCore::mapWidth):
(WebCore::SystemFontDatabaseCoreText::systemFontParameters):
(WebCore::SystemFontDatabaseCoreText::createFontByApplyingWeightItalicsAndFallbackBehavior): Deleted.

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::operator== const):
(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:

LayoutTests:

  • fast/text/system-font-width-2-expected-mismatch.html: Added.
  • fast/text/system-font-width-2.html: Added.
  • fast/text/system-font-width-3-expected-mismatch.html: Added.
  • fast/text/system-font-width-3.html: Added.
  • fast/text/system-font-width-4-expected-mismatch.html: Added.
  • fast/text/system-font-width-4.html: Added.
  • fast/text/system-font-width-5-expected.html: Added.
  • fast/text/system-font-width-5.html: Added.
  • fast/text/system-font-width-6-expected-mismatch.html: Added.
  • fast/text/system-font-width-6.html: Added.
  • fast/text/system-font-width-7-expected-mismatch.html: Added.
  • fast/text/system-font-width-7.html: Added.
  • fast/text/system-font-width-8-expected-mismatch.html: Added.
  • fast/text/system-font-width-8.html: Added.
  • fast/text/system-font-width-9-expected-mismatch.html: Added.
  • fast/text/system-font-width-9.html: Added.
  • fast/text/system-font-width-expected-mismatch.html: Added.
  • fast/text/system-font-width.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
11:31 AM Changeset in webkit [272072] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Stop observing changes in one preference domain
https://bugs.webkit.org/show_bug.cgi?id=221130
<rdar://problem/70729182>

Reviewed by Brent Fulgham.

It has been determined that there is no need to observe preference changes in the domain 'com.apple.Preferences'.

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKPreferenceObserver init]):

11:26 AM Changeset in webkit [272071] by commit-queue@webkit.org
  • 8 edits
    1 add in trunk

[JSC] WebAssembly.Global should support Funcref and Externref
https://bugs.webkit.org/show_bug.cgi?id=220914

Patch by Dmitry Bezhetskov <dbezhetskov> on 2021-01-29
Reviewed by Yusuke Suzuki.

JSTests:

Add tests for WebAssembly.Global ctors with
new reference types:
https://webassembly.github.io/reference-types/js-api/index.html#dom-global-global.

  • wasm/references/globals.js: Added.

(Pelmen):
(testGlobalConstructorForExternref):
(async testGlobalConstructorForFuncref):

Source/JavaScriptCore:

Allow using reference types in ctor of WebAssembly.Global
according to the spec
https://webassembly.github.io/reference-types/js-api/index.html#dom-global-global.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

11:25 AM Changeset in webkit [272070] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add audio related shm write reporting
https://bugs.webkit.org/show_bug.cgi?id=221136
<rdar://problem/73510094>

Reviewed by Brent Fulgham.

Add audio related shm write reporting in the WebContent process' sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
11:22 AM Changeset in webkit [272069] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Remove access to IOSurfaceSendRight
https://bugs.webkit.org/show_bug.cgi?id=221131
<rdar://problem/70496356>

Reviewed by Brent Fulgham.

Remove access to IOSurfaceSendRight in the WebContent process on macOS, since there are no reports of this being used.

  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuIOKitClasses):

  • WebProcess/com.apple.WebProcess.sb.in:
11:14 AM Changeset in webkit [272068] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r272020 and r272034.
https://bugs.webkit.org/show_bug.cgi?id=221144

Revert potentially related change while investigating crash

Reverted changesets:

"[macOS] WebProcess::updateProcessName should initiate network
process connection if none exists"
https://bugs.webkit.org/show_bug.cgi?id=221094
https://trac.webkit.org/changeset/272020

"Unreviewed macOS build fix after r272020."
https://trac.webkit.org/changeset/272034

11:07 AM Changeset in webkit [272067] by Andres Gonzalez
  • 22 edits
    2 adds in trunk

Support for aria-current state changed notifications.
https://bugs.webkit.org/show_bug.cgi?id=221074

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/aria-current-state-changed-notification.html

Added handling of the AXCurrentStateChanged notification for Mac and iOS
ports. This notification is fired when the aria-current attribute
changes.
Handling of this notification is required to properly update the
accessibility properties of the target object and convey them to
assistive technology clients.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<): Renamed notification anumerand.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChange):

  • accessibility/AXObjectCache.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/ios/AXObjectCacheIOS.mm:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityDOMIdentifier]):
(-[WebAccessibilityObjectWrapper postCurrentStateChangedNotification]):
(-[WebAccessibilityObjectWrapper accessibilityCurrentState]):
(-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]): Renamed to accessibilityCurrentState.

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Added AccessibilityUIElement::domIdentifier and currentStateValue used
in LayoutTests/accessibility/aria-current-state-changed-notification.html.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::domIdentifier const): Non-Cocoa implementation.
(WTR::AccessibilityUIElement::currentStateValue const): Non-Cocoa implementation.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::currentStateValue const):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::currentStateValue const):

LayoutTests:

  • accessibility/aria-current-state-changed-notification-expected.txt: Added.
  • accessibility/aria-current-state-changed-notification.html: Added.
  • accessibility/aria-current.html:

Use AccessibilityUIElement::currentStateValue for consistency and to
match closely how actual clients will invoke this functionality.

  • platform/gtk/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
10:48 AM Changeset in webkit [272066] by weinig@apple.com
  • 7 edits
    2 adds in trunk/Source/WebCore

Extract color model and transfer functions into their own files
https://bugs.webkit.org/show_bug.cgi?id=221105

Reviewed by Tim Horton.

Things are getting a bit cramped in ColorTypes.h and ColorConversions.
This extracts the color models into ColorModels.h and gamma transfer
functions into ColorTransferFunctions.h and generalized the transfer
functions a bit to reduce the code size.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ColorModels.h: Added.
  • platform/graphics/ColorTransferFunctions.h: Added.
  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:

Move code to new files.

10:40 AM Changeset in webkit [272065] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add reporting for some syscalls
https://bugs.webkit.org/show_bug.cgi?id=221135
<rdar://problem/73513138>

Reviewed by Brent Fulgham.

Add reporting for some syscalls in the WebContent process on macOS in order to determine if they are being used.

  • WebProcess/com.apple.WebProcess.sb.in:
10:11 AM Changeset in webkit [272064] by ddkilzer@apple.com
  • 6 edits in trunk

check-webkit-style: warn about WTF::BlockPtr use in JavaScriptCore until ARC is enabled
<https://webkit.org/b/221108>
<rdar://problem/73726640>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • API/JSVirtualMachine.mm:
  • inspector/remote/RemoteConnectionToTarget.h:
  • Remove or replace unused <wtf/BlockPtr.h> headers.

Tools:

  • Scripts/webkitpy/style/checkers/cpp.py:

(_is_javascriptcore_file): Add.

  • Extract code to reuse from check_identifier_name_in_declaration().

(check_include_line):
(check_language):

  • Add check for use of WTF::BlockPtr.

(check_identifier_name_in_declaration):

  • Use _is_javascriptcore_file().

(CppChecker):

  • Add 'security/javascriptcore_wtf_blockptr' to list of checkers.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTestBase.perform_language_rules_check):

  • Add 'security/javascriptcore_wtf_blockptr' to list of checkers for testing header includes.

(OrderOfIncludesTest.test_check_wtf_blockptr_usage_in_javascriptcore):

9:34 AM Changeset in webkit [272063] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: [BigSur wk1] media/mediacapabilities/vp9.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221095

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-01-29

  • platform/mac-wk1/TestExpectations:
9:20 AM Changeset in webkit [272062] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Switch over to legacy line layout when inline tree is required
https://bugs.webkit.org/show_bug.cgi?id=221118

Reviewed by Antti Koivisto.

These functions still require inline tree.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::generateLineBoxRects const):
(WebCore::RenderInline::absoluteRects const):
(WebCore::RenderInline::absoluteQuads const):
(WebCore::RenderInline::absoluteQuadsIgnoringContinuation const):
(WebCore::RenderInline::addFocusRingRects):

9:15 AM Changeset in webkit [272061] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Two 'tests' are running with out expectation files that are not real tests.
https://bugs.webkit.org/show_bug.cgi?id=208477

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:11 AM Changeset in webkit [272060] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Unreviewed, reverting r272052.
https://bugs.webkit.org/show_bug.cgi?id=221132

WPT mediacapture-record/MediaRecorder-stop.html is broken

Reverted changeset:

"Use WebRTC GPU process flag for MediaRecorder"
https://bugs.webkit.org/show_bug.cgi?id=220967
https://trac.webkit.org/changeset/272052

6:53 AM Changeset in webkit [272059] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
https://bugs.webkit.org/show_bug.cgi?id=220576

Reviewed by Simon Fraser.

Source/WebCore:

convertImageDataToColorSpace() creates a temporary ImageBuffer with the
size of m_premultipliedImageResult. This ImageBuffer has to be scaled
with the filterScale(). But the size of m_premultipliedImageResult is
scaled with the filterScale(). This means, convertImageDataToColorSpace()
applies the filterScale() twice to the temporary ImageBuffer.

The fix is to create the temporary ImageBuffer with the unscaled size of
the input ImageData and scale it with the filterScale().

Test: fast/hidpi/filters-component-transfer.html

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::convertImageDataToColorSpace):
(WebCore::FilterEffect::copyPremultipliedResult):

LayoutTests:

  • fast/hidpi/filters-component-transfer-expected.html: Added.
  • fast/hidpi/filters-component-transfer.html: Added.
5:03 AM Changeset in webkit [272058] by commit-queue@webkit.org
  • 17 edits in trunk/Source/WebKit

Some type serialization encoders are implemented in Encoder class
https://bugs.webkit.org/show_bug.cgi?id=220519

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-29
Reviewed by Chris Dumez.

Move arithmetic type and enum type serialization from Encoder to
ArgumentCoder. This makes it a bit simpler to implement multiple
Encoder types, as the serialization code is consistently separate
from the Encoder. WebGL SHM IPC stream extensions would eventually
need a similar but slightly different Encoder.

Since Encoder is intentionally coupled with the Decoder, do the
corresponding modification to Decoder class for consistency.

Reimplement Has{Legacy,Modern}Decoder for ease of forward declaration
and (perhaps?) in a bit simpler terms.

Encoder::operator<<() and Encoder::encode() were the same function.
Remove Encoder::encode().

No new tests, a refactor.

  • NetworkProcess/NetworkSocketChannel.h:
  • Platform/IPC/ArgumentCoder.h:

(IPC::Detail::TestLegacyDecoder):
(IPC::Detail::TestModernDecoder):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):

  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/Connection.h:

(IPC::Connection::send):
(IPC::Connection::sendWithAsyncReply):
(IPC::Connection::sendSync):

  • Platform/IPC/Decoder.h:

(IPC::Decoder::decode):
(IPC::Decoder::operator>>):

  • Platform/IPC/Encoder.h:
  • Platform/IPC/MessageSender.h:
  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::open):

  • Platform/cocoa/SharedMemoryCocoa.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const):

  • Shared/RemoteLayerTree/RemoteScrollingUIState.cpp:

(WebKit::RemoteScrollingUIState::encode const):

  • UIProcess/AuxiliaryProcessProxy.h:

(WebKit::AuxiliaryProcessProxy::send):
(WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):

  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPC::sendMessage):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRendering):

3:01 AM Changeset in webkit [272057] by commit-queue@webkit.org
  • 4 edits in trunk/Source

[GTK] return-type-c-linkage warnings
https://bugs.webkit.org/show_bug.cgi?id=221047

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

Remove extern "C" braces, un-needed for private C++ objects.

Source/WebCore:

  • platform/network/soup/WebKitFormDataInputStream.h:

Source/WebKit:

  • NetworkProcess/soup/WebKitDirectoryInputStream.h:
2:46 AM Changeset in webkit [272056] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

[JSC] Implement --artifact-exec-wrapper
https://bugs.webkit.org/show_bug.cgi?id=220924

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2021-01-29
Reviewed by Carlos Alberto Lopez Perez.

Add an option to specify a wrapper for executing the built
artifacts for JSC (i.e. jsc, testmasm, ...). This is useful when
crossbuilding, to be able to specify the ELF interpreter and
LD_LIBRARY_PATH for the built executables (and only those; the
scripts may well execute native binaries that shouldn't be
wrapped). It's not needed when running the tests on the remotes
(as generate-bundle will take care of all that), but helps
e.g. when running 32-bit ARM binaries on a 64-bit host and not
using the system compiler/libraries.

This patch also simplifies the bytecode cache helper by switching
the argument order and changes a couple of uses of pathToVM to
vmCommand for consistency. It should be noted that
--artifact-exec-wrapper is not compatible with
--force-architecture. That shouldn't be a problem as (a) the use
cases of the two flags don't seem to overlap and (b) the exec
wrapper can subsume the functionality of --force-architecture.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh:
  • Scripts/run-javascriptcore-tests:

(runTest):
(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
2:36 AM Changeset in webkit [272055] by Philippe Normand
  • 9 edits in trunk

[GStreamer][Playbin3] Support for CEA-608 closed captioned media
https://bugs.webkit.org/show_bug.cgi?id=220654

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Playbin2 currently doesn't support closed-caption formats such as CEA-608 and CEA-708.
However playbin3's decodebin3 will expose a source pad for these, so our text combiner can
handle this format, by adding a custom encoder that converts CEA-608 to WebVTT.

No new tests, although media/media-captions.html and media/track/track-in-band-style.html
will now pass when this env var is set WEBKIT_GST_USE_PLAYBIN3=1.

  • Modules/mediacontrols/mediaControlsAdwaita.css: Synchronize text-track-container and cue

CSS with mediaControlsBase.css.
(video::-webkit-media-text-track-container,):
(video::-webkit-media-text-track-container):
(video::cue):
(video::cue(:future)):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Set track kind according

to the GstStream format this track represents.
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Drive-by, check

WEBKIT_GST_USE_PLAYBIN3 contents and sprinkle a few more debug calls.
(WebCore::MediaPlayerPrivateGStreamer::doSeek):
(WebCore::MediaPlayerPrivateGStreamer::timeChanged):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Plug custom encoder handling

conversion of CEA-608 to WebVTT.
(webKitTextCombinerHandleCapsEvent):
(webkitTextCombinerReleasePad):
(webKitTextCombinerConstructed):

LayoutTests:

  • media/track/track-in-band-style-expected.txt:
  • media/track/track-in-band-style.html:
2:01 AM Changeset in webkit [272054] by svillar@igalia.com
  • 4 edits
    2 adds in trunk

[css-flexbox] REGRESSION(r266695): content inside a <button> inside a flex container has a height of 0 without a declared min-height
https://bugs.webkit.org/show_bug.cgi?id=220946

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/flexbox/percentage-descendants-of-skipped-flex-item.html

r252620 added an optimization which saves layouts for flexbox containers' descendants with percentage heights.
That optimization relies on a hash map of percentage height descendants that is filled in with calls to
addPercentHeightDescendant().

FlexibleBoxImpl's like RenderButton might wrap their children in anonymous blocks. Those anonymous blocks are
skipped for percentage height calculations in RenderBox::computePercentageLogicalHeight() and thus
addPercentHeightDescendant() is never called for them. This means that hasPercentageHeightDescendants() would
always wrongly return false for a child of a <button> with a percentage height.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childHasPercentHeightDescendants const): Renamed from hasPercentHeightDescendants in
order not to clash with RenderBlock method. It now also checks whether flex items skipped from percentage
height calculations are the containing blocks of any percentage height descendant of the flex container
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::hasPercentHeightDescendants const): Deleted.

  • rendering/RenderFlexibleBox.h:

LayoutTests:

  • css3/flexbox/percentage-descendants-of-skipped-flex-item-expected.html: Added.
  • css3/flexbox/percentage-descendants-of-skipped-flex-item.html: Added.
1:01 AM Changeset in webkit [272053] by youenn@apple.com
  • 6 edits in trunk

[MacOS] Enable WebKitTestRunner audio and video capture in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=221035

Reviewed by Eric Carlson.

Tools:

Remove the default TestOptions values and instead on MacOS rely on capture in GPUProcess.
On iOS, capture ill still happen inprocess for the time being.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

fast/mediastream/media-stream-track-interrupted.html needs to be run with mock audio capture in process
as interruption mock testing is only supported this way.
SpeechRecognition in GPUProcess is not yet working so we disable capture in GPU Process for these two tests
until SpeechRecognition in GPUProcess is supported.

  • fast/mediastream/media-stream-track-interrupted.html:
  • fast/speechrecognition/start-recognition-then-stop.html:
  • fast/speechrecognition/start-second-recognition.html:
12:53 AM Changeset in webkit [272052] by youenn@apple.com
  • 14 edits
    2 deletes in trunk

Use WebRTC GPU process flag for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=220967

Reviewed by Eric Carlson.

Source/WebCore:

Remove Internals::setUseGPUProcessForWebRTC and rely on WebRTC codec feature flag.

  • Modules/mediarecorder/MediaRecorderProvider.h:
  • testing/Internals.cpp:

(WebCore::Internals::setUseGPUProcessForWebRTC): Deleted.

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

Source/WebKit:

  • WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:

(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):

LayoutTests:

Update test to use feature flag instead of internals API.
Removing webrtc/video-gpuProcess.html since it is now equivalent to webrtc/video.html.

  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html:
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
  • http/wpt/mediarecorder/MediaRecorder-requestData.html:
  • http/wpt/mediarecorder/mute-tracks.html:
  • http/wpt/mediarecorder/pause-recording.html:
  • platform/glib/TestExpectations:
  • webrtc/video-gpuProcess-expected.txt: Deleted.
  • webrtc/video-gpuProcess.html: Deleted.
12:49 AM Changeset in webkit [272051] by Carlos Garcia Campos
  • 7 edits
    2 adds in trunk

[SOUP] Use a GInputStream to set the request body in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221034

Reviewed by Adrian Perez de Castro.

Source/WebCore:

In libsoup3, the request body can be set using a stream. Add the stream now, that can still be used in libsoup2
to set the body data. This moves the FormData processing code to WebKitFormDataInputStream and also implements
the file seek and range length, which makes test http/tests/local/blob/send-hybrid-blob-using-open-panel.html pass.

  • platform/SourcesSoup.txt:
  • platform/network/soup/ResourceRequestSoup.cpp:

(WebCore::ResourceRequest::updateSoupMessageBody const):

  • platform/network/soup/WebKitFormDataInputStream.cpp: Added.

(webkitFormDataInputStreamCreateNextStream):
(webkitFormDataInputStreamRead):
(webkitFormDataInputStreamClose):
(webkit_form_data_input_stream_class_init):
(webkitFormDataInputStreamNew):
(webkitFormDataInputStreamReadAll):

  • platform/network/soup/WebKitFormDataInputStream.h: Added.

Tools:

Add WebKitFormDataInputStream as an exception for some style checker rules.

  • Scripts/webkitpy/style/checker.py:

LayoutTests:

Remove expectations of http/tests/local/blob/send-hybrid-blob-using-open-panel.html that is now passing.

  • platform/gtk/TestExpectations:
12:47 AM Changeset in webkit [272050] by youenn@apple.com
  • 10 edits in trunk

Recover audio and video capture from GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=221086

Reviewed by Eric Carlson.

Make RemoteRealtimeMediaSource observe GPU process crash.
If RemoteRealtimeMediaSource is live and capturing in GPUProcess, restart capture from WebProcess.
If GPU process crashes, make sure to send back the necessary entitlements and information to GPUProcess
of which processes are allowed to capture.

Covered by API test.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::gpuProcessCrashed):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::didUpdateSourceConnection):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:

(WebKit::RemoteRealtimeMediaSource::create):
(WebKit::RemoteRealtimeMediaSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeMediaSource::~RemoteRealtimeMediaSource):
(WebKit::RemoteRealtimeMediaSource::gpuProcessConnectionDidClose):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource):
(WebKit::UserMediaCaptureManager::VideoFactory::createVideoCaptureSource):
(WebKit::UserMediaCaptureManager::DisplayFactory::createDisplayCaptureSource):
(WebKit::UserMediaCaptureManager::didUpdateSourceConnection):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
12:04 AM Changeset in webkit [272049] by commit-queue@webkit.org
  • 4 edits in trunk

Fix logic error in shouldComputeLogicalHeightFromAspectRatio
https://bugs.webkit.org/show_bug.cgi?id=220965

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

Source/WebCore:

Logical height that uses percentages should be computed through
aspect-ratio only if it is not resolvable.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/percentage-resolution-005.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalHeightFromAspectRatio const):

LayoutTests:

percentage-resolution-005.html now passes.

Note: See TracTimeline for information about the timeline view.