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

Timeline



Jan 31, 2021:

11:17 PM Changeset in webkit [272129] by calvaris@igalia.com
  • 5 edits in trunk/Source/WebCore

[GStreamer][EME] Add basic cbcs support
https://bugs.webkit.org/show_bug.cgi?id=221133

Reviewed by Philippe Normand.

Add cbcs as supported encryption scheme.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::capsMediaType):

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::CDMPrivateThunder::supportedInitDataTypes const):

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(transformInPlace):

  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:
4:45 PM Changeset in webkit [272128] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] InlineContentBreaker::processOverflowingTextContent should find breaking positions even after the overflowing run
https://bugs.webkit.org/show_bug.cgi?id=221189

Reviewed by Antti Koivisto.

When the content has multiple (continous)runs, and we find the overflowing one

  1. first start searching backwards to see if we can find something that's breakable (this is already implemented)
  2. start searching forward to see if we can find something that's breakable -though in this case it's surely overflowing.

This patch implements #2.

  • layout/inlineformatting/InlineContentBreaker.cpp:

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

12:48 PM Changeset in webkit [272127] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

Date.parse returns non-integral time value
https://bugs.webkit.org/show_bug.cgi?id=220687

Reviewed by Ross Kirsling.

JSTests:

  • complex.yaml:
  • complex/date-parse-milliseconds.js: Added.

(shouldBe):

Source/WTF:

Use milliseconds instead of seconds as a base unit to avoid floating point rounding for milliseconds.

  • wtf/DateMath.cpp:

(WTF::ymdhmsToMilliseconds):
(WTF::parseES5TimePortion):
(WTF::parseES5DateFromNullTerminatedCharacters):
(WTF::parseDateFromNullTerminatedCharacters):
(WTF::ymdhmsToSeconds): Deleted.

12:31 PM Changeset in webkit [272126] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not use a max value to indicate infinite available space in InlineContentBreaker::tryBreakingTextRun
https://bugs.webkit.org/show_bug.cgi?id=221188

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): add fast paths for cases when the available space is zero.
Note that there's a difference between returning nullopt and an empty value.

  • layout/inlineformatting/InlineContentBreaker.h:
12:24 PM Changeset in webkit [272125] by weinig@apple.com
  • 18 edits
    8 adds in trunk

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

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add some new WPT tests for color(prophoto-rgb ) that will be upstreamed shortly.
(see https://github.com/web-platform-tests/wpt/pull/27416).

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

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-001.html

imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-002.html
imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-003.html
imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-004.html

  • css/CSSValueKeywords.in:

Add prophoto-rgb keyword.

  • css/parser/CSSPropertyParserHelpers.cpp:

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

  • platform/graphics/ColorConversion.cpp:

(WebCore::convertFromD50WhitePointToD65WhitePoint):
(WebCore::convertFromD65WhitePointToD50WhitePoint):
Move these chromatic adaptation conversions up in the file so they can be reused by
toLinearProPhotoRGB(copnst XYZA&) and toXYZA(const LinearProPhotoRGB).

(WebCore::toLinearProPhotoRGB):
(WebCore::toProPhotoRGB):
(WebCore::toXYZA):

  • platform/graphics/ColorConversion.h:

(WebCore::toLinearRec2020):
(WebCore::toProPhotoRGB):
(WebCore::toLinearProPhotoRGB):
(WebCore::callWithColorType):
Add conversion support for ProPhotoRGB, utilizing the ProPhotoRGBTransferFunction
for gamma correction.

  • 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 ProPhotoRGB as a new ColorSpace.

  • platform/graphics/ColorTransferFunctions.h:

(WebCore::mode>::toGammaEncoded):
(WebCore::mode>::toLinear):
Add transfer function for ProPhotoRGB. Both clamped and unclamped
are implemented, though for now, only the clamped variant is
being used. Also fix small bug in unclamped Rec2020TransferFunction
that I meant to land before where the sign wasn't getting applied
to the whole computation.

  • platform/graphics/ColorTypes.h:

Add ProPhotoRGB and LinearProPhotoRGB types. Fix typo in forward
declaration of the XYZA type.

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::proPhotoRGBColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):
Add support for the ProPhotoRGB as a CoreGraphics color space, where
it is known as kCGColorSpaceROMMRGB (ROMM stands for Reference Output
Medium Metric, another name for ProPhoto).

LayoutTests:

Remove now passing prophoto-rgb tests.

  • fast/css/parsing-color-function-expected.txt:
  • fast/css/parsing-color-function.html:

Add prophoto-rgb as an rgb type so it gets tested with the
others.

9:16 AM Changeset in webkit [272124] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] TrailingTextContent should be able to tell if even the first run in the set does not fit
https://bugs.webkit.org/show_bug.cgi?id=221185

Reviewed by Antti Koivisto.

There are 3 distinct cases here that we should be able to encode with the return value of processOverflowingTextContent.

  1. We did not find any breakable run in the set -> return value is nullopt
  2. We did find a breakable run but even the first run does not fit at all -> TrailingTextContent::runIndex is nullopt
  3. We did find a breakable run and we can fit the first run (either fully or partially) -> TrailingTextContent::runIndex is 0.

Make TrailingTextContent::runIndex optional so that we can tell the difference between #2 and #3.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

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.
Note: See TracTimeline for information about the timeline view.