[webkit-changes] [WebKit/WebKit] bae839: Make CSSValueList immutable

Darin Adler noreply at github.com
Mon Feb 20 13:49:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bae83919e283152f248364fa56eb06b0ef9f89ab
      https://github.com/WebKit/WebKit/commit/bae83919e283152f248364fa56eb06b0ef9f89ab
  Author: Darin Adler <darin at apple.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/ConfigFile.cpp
    M Source/JavaScriptCore/yarr/YarrPattern.cpp
    M Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc
    M Source/WebCore/animation/CompositeOperation.cpp
    M Source/WebCore/css/CSSBorderImage.cpp
    M Source/WebCore/css/CSSCounterStyleDescriptors.cpp
    M Source/WebCore/css/CSSFontFace.cpp
    M Source/WebCore/css/CSSFontFaceSet.cpp
    M Source/WebCore/css/CSSFunctionValue.cpp
    M Source/WebCore/css/CSSFunctionValue.h
    M Source/WebCore/css/CSSGridAutoRepeatValue.cpp
    M Source/WebCore/css/CSSGridAutoRepeatValue.h
    M Source/WebCore/css/CSSGridIntegerRepeatValue.cpp
    M Source/WebCore/css/CSSGridIntegerRepeatValue.h
    M Source/WebCore/css/CSSGridLineNamesValue.cpp
    M Source/WebCore/css/CSSGridLineNamesValue.h
    M Source/WebCore/css/CSSImageSetValue.cpp
    M Source/WebCore/css/CSSImageSetValue.h
    M Source/WebCore/css/CSSPrimitiveValueMappings.h
    M Source/WebCore/css/CSSProperty.cpp
    M Source/WebCore/css/CSSProperty.h
    M Source/WebCore/css/CSSSubgridValue.cpp
    M Source/WebCore/css/CSSSubgridValue.h
    M Source/WebCore/css/CSSToStyleMap.cpp
    M Source/WebCore/css/CSSToStyleMap.h
    M Source/WebCore/css/CSSTransformListValue.cpp
    M Source/WebCore/css/CSSTransformListValue.h
    M Source/WebCore/css/CSSValue.cpp
    M Source/WebCore/css/CSSValueList.cpp
    M Source/WebCore/css/CSSValueList.h
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/ComputedStyleExtractor.h
    M Source/WebCore/css/DOMMatrixReadOnly.cpp
    M Source/WebCore/css/DeprecatedCSSOMValueList.h
    M Source/WebCore/css/FontFace.cpp
    M Source/WebCore/css/FontVariantBuilder.cpp
    M Source/WebCore/css/ShorthandSerializer.cpp
    M Source/WebCore/css/TransformFunctions.cpp
    M Source/WebCore/css/parser/CSSParserFastPaths.cpp
    M Source/WebCore/css/parser/CSSParserImpl.cpp
    M Source/WebCore/css/parser/CSSPropertyParser.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
    M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp
    M Source/WebCore/css/process-css-properties.py
    M Source/WebCore/css/typedom/CSSStyleValueFactory.cpp
    M Source/WebCore/css/typedom/CSSStyleValueFactory.h
    M Source/WebCore/css/typedom/StylePropertyMap.cpp
    M Source/WebCore/css/typedom/StylePropertyMapReadOnly.cpp
    M Source/WebCore/css/typedom/transform/CSSMatrixComponent.cpp
    M Source/WebCore/css/typedom/transform/CSSPerspective.cpp
    M Source/WebCore/css/typedom/transform/CSSRotate.cpp
    M Source/WebCore/css/typedom/transform/CSSScale.cpp
    M Source/WebCore/css/typedom/transform/CSSSkew.cpp
    M Source/WebCore/css/typedom/transform/CSSSkewX.cpp
    M Source/WebCore/css/typedom/transform/CSSSkewY.cpp
    M Source/WebCore/css/typedom/transform/CSSTransformValue.cpp
    M Source/WebCore/css/typedom/transform/CSSTransformValue.h
    M Source/WebCore/css/typedom/transform/CSSTranslate.cpp
    M Source/WebCore/editing/ApplyStyleCommand.cpp
    M Source/WebCore/editing/DeleteSelectionCommand.cpp
    M Source/WebCore/editing/EditingStyle.cpp
    M Source/WebCore/editing/FontAttributeChanges.cpp
    M Source/WebCore/editing/markup.cpp
    M Source/WebCore/html/HTMLElement.cpp
    M Source/WebCore/inspector/InspectorOverlay.cpp
    M Source/WebCore/platform/animation/TimingFunction.cpp
    M Source/WebCore/rendering/style/StyleImageSet.cpp
    M Source/WebCore/style/FilterOperationsBuilder.cpp
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleBuilderCustom.h
    M Source/WebCore/svg/SVGFontFaceElement.cpp
    M Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm
    M Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp

  Log Message:
  -----------
  Make CSSValueList immutable
https://bugs.webkit.org/show_bug.cgi?id=252121
rdar://problem/105342727

Reviewed by Antti Koivisto.

Removes the mutating functions from CSSValueContainingVector and implements
it slight more efficiently than the Vector-based implementation. We can do
further optimization in the future based on knowing the size at create time.

* Source/JavaScriptCore/runtime/ConfigFile.cpp:
(JSC::ConfigFile::canonicalizePaths): Fixed "seperator" spelling error.
* Source/JavaScriptCore/yarr/YarrPattern.cpp:
(JSC::Yarr::dumpCharacterClass): Ditto.
* Source/ThirdParty/libwebrtc/Source/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc:
Ditto.

* Source/WebCore/animation/CompositeOperation.cpp:
(WebCore::toCompositeOperation): Use CSSValue::valueID.

* Source/WebCore/css/CSSBorderImage.cpp:
(WebCore::createBorderImageValue): Use CSSValueListBuilder.

* Source/WebCore/css/CSSCounterStyleDescriptors.cpp:
(WebCore::translateRangeFromStyleProperties): Updated for change to CSSValueList
iteration.
(WebCore::translateSymbolsFromStyleProperties): Ditto.
* Source/WebCore/css/CSSFontFace.cpp:
(WebCore::CSSFontFace::appendSources): Ditto.
(WebCore::CSSFontFace::setUnicodeRange): Ditto.
(WebCore::CSSFontFace::setFeatureSettings): Ditto.

* Source/WebCore/css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): Create the
families list without appending.
(WebCore::CSSFontFaceSet::addToFacesLookupTable): Updated for change to
CSSValueList iteration.
(WebCore::CSSFontFaceSet::removeFromFacesLookupTable): Ditto.

* Source/WebCore/css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::CSSFunctionValue): Added constructors that take
arguments so we don't have to append them later.
(WebCore::CSSFunctionValue::create): Ditto.
* Source/WebCore/css/CSSFunctionValue.h: Ditto.

* Source/WebCore/css/CSSGridAutoRepeatValue.cpp:
(WebCore::CSSGridAutoRepeatValue::CSSGridAutoRepeatValue): Added a
CSSValueListBuilder argument.
(WebCore::CSSGridAutoRepeatValue::create): Ditto.
* Source/WebCore/css/CSSGridAutoRepeatValue.h: Ditto.
* Source/WebCore/css/CSSGridIntegerRepeatValue.cpp:
(WebCore::CSSGridIntegerRepeatValue::CSSGridIntegerRepeatValue): Ditto.
(WebCore::CSSGridIntegerRepeatValue::create): Ditto.
* Source/WebCore/css/CSSGridIntegerRepeatValue.h: Ditto.

* Source/WebCore/css/CSSGridLineNamesValue.cpp:
(WebCore::CSSGridLineNamesValue::customCSSText const): Update to use
FixedVector<String> instead of a vector of CSSValue.
(WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Ditto.
(WebCore::CSSGridLineNamesValue::create): Ditto.
* Source/WebCore/css/CSSGridLineNamesValue.h: Ditto.

* Source/WebCore/css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::create): Added a CSSValueListBuilder argument.
(WebCore::CSSImageSetValue::CSSImageSetValue): Ditto.
* Source/WebCore/css/CSSImageSetValue.h: Ditto.

* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::fromCSSValue): Use CSSValue::valueID.

* Source/WebCore/css/CSSProperty.cpp:
(WebCore::CSSProperty::wrapValueInCommaSeparatedList): Deleted.
(WebCore::CSSProperty::createListForProperty): Deleted.
* Source/WebCore/css/CSSProperty.h: Updated for above deletions.

* Source/WebCore/css/CSSSubgridValue.cpp:
(WebCore::CSSSubgridValue::CSSSubgridValue): Added a CSSValueListBuilder
argument.
(WebCore::CSSSubgridValue::create): Ditto.
* Source/WebCore/css/CSSSubgridValue.h: Ditto.

* Source/WebCore/css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment): Use CSSValue::valueID.
(WebCore::CSSToStyleMap::mapFillImage): Take a const CSSValue& argument.
(WebCore::CSSToStyleMap::mapFillMaskMode): Use CSSValue::valueID.
(WebCore::CSSToStyleMap::mapAnimationDirection): Ditto.
(WebCore::CSSToStyleMap::mapAnimationFillMode): Ditto.
(WebCore::CSSToStyleMap::mapAnimationPlayState): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImage): Updated for change to
CSSValueList iteration.
* Source/WebCore/css/CSSToStyleMap.h: Updated for the above.

* Source/WebCore/css/CSSTransformListValue.cpp:
(WebCore::CSSTransformListValue::CSSTransformListValue): Added a
CSSValueListBuilder argument.
(WebCore::CSSTransformListValue::create): Ditto.
* Source/WebCore/css/CSSTransformListValue.h: Ditto.

* Source/WebCore/css/CSSValue.cpp:
(WebCore::CSSValue::collectComputedStyleDependencies const): Updated for
change to CSSValueList iteration.

* Source/WebCore/css/CSSValueList.cpp:
(WebCore::CSSValueContainingVector::CSSValueContainingVector): Updated
to initialize new data members m_size, m_inlineStorage, m_additionalStorage.
(WebCore::CSSValueList::CSSValueList): Added overloads with the builder and
with 1-4 values.
(WebCore::CSSValueList::createCommaSeparated): Ditto.
(WebCore::CSSValueList::createSlashSeparated): Ditto.
(WebCore::CSSValueList::createSpaceSeparated): Ditto.
(WebCore::CSSValueList::create): Added. Takes a separator character argument.
(WebCore::CSSValueContainingVector::removeAll): Deleted.
(WebCore::CSSValueContainingVector::hasValue const): Use iterator.
(WebCore::CSSValueContainingVector::copyValues const): Renamed from
CSSValueList::copy and implemented using iterator.
(WebCore::CSSValueContainingVector::serializeItems const): Use iterator.
(WebCore::CSSValueContainingVector::itemsEqual const): Use operator[].
(WebCore::CSSValueContainingVector::containsSingleEqualItem const): Use
size and operator[].
(WebCore::CSSValueContainingVector::customTraverseSubresources const):
Use iterator.

* Source/WebCore/css/CSSValueList.h: Removed unneeded includes.
Updated for the above. Added ~CSSValueContainingVector and operator[].

* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::OrderedNamedLinesCollector::appendLines const): Use Vector<String>.
(WebCore::OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex const):
Ditto.
(WebCore::OrderedNamedLinesCollectorInSubgridLayout::collectLineNamesForIndex const):
Ditto.
(WebCore::createPositionListForLayer): Use CSSValueListBuilder.
(WebCore::createSingleAxisPositionValueForLayer): Use CSSValueList create
functions instead of append.
(WebCore::valueForQuotes): Use CSSValueListBuilder.
(WebCore::itemsEqual): Added.
(WebCore::borderRadiusShorthandValue): Use CSSValueListBuilder.
(WebCore::matrixTransformValue): Ditto.
(WebCore::transformOperationAsCSSValue): Use CSSValueList create functions
instead of append.
(WebCore::computedTransform): Use CSSValueListBuilder.
(WebCore::computedTranslate): Use CSSValueList create functions instead of
append.
(WebCore::computedScale): Ditto.
(WebCore::computedRotate): Ditto.
(WebCore::ComputedStyleExtractor::valueForShadow): Use CSSValueListBuilder,
and also use Vector::reverse instead of prepend.
(WebCore::ComputedStyleExtractor::valueForFilter): Use CSSValueListBuilder.
(WebCore::specifiedValueForGridTrackSize): Use CSSFunctionValue create
functions instead of append.
(WebCore::addValuesForNamedGridLinesAtIndex): Use Vector<String> and
CSSValueListBuilder.
(WebCore::valueForGridTrackSizeList): Use CSSValueListBuilder.
(WebCore::populateGridTrackList): Ditto.
(WebCore::populateSubgridLineNameList): Ditto.
(WebCore::valueForGridTrackList): Ditto.
(WebCore::valueForGridPosition): Ditto.
(WebCore::valueForScrollSnapType): Use CSSValueList create functions
instead of append.
(WebCore::valueForScrollSnapAlignment): Ditto.
(WebCore::valueForTextEdge): Ditto.
(WebCore::willChangePropertyValue): Use CSSValueListBuilder.
(WebCore::appendLigaturesValue): Ditto.
(WebCore::fontVariantLigaturesPropertyValue): Ditto.
(WebCore::fontVariantNumericPropertyValue): Ditto.
(WebCore::fontVariantEastAsianPropertyValue): Ditto.
(WebCore::ComputedStyleExtractor::addValueForAnimationPropertyToList):
Ditto.
(WebCore::valueListForAnimationOrTransitionProperty): Ditto.
(WebCore::animationShorthandValue): Ditto.
(WebCore::valueForPosition): Use CSSValueList create functions instead of
append.
(WebCore::valueForPathOperation): Ditto.
(WebCore::valueForContainIntrinsicSize): Ditto.
(WebCore::touchActionFlagsToCSSValue): Ditto.
(WebCore::renderTextDecorationLineFlagsToCSSValue): Ditto.
(WebCore::renderEmphasisPositionFlagsToCSSValue): Ditto.
(WebCore::valueForTextEmphasisStyle): Use CSSValueList create functions
instead of append.
(WebCore::speakAsToCSSValue): Use CSSValueListBuilder.
(WebCore::hangingPunctuationToCSSValue): Ditto.
(WebCore::fillRepeatToCSSValue): Use CSSValueList create functions instead of
append.
(WebCore::fillSizeToCSSValue): Ditto.
(WebCore::contentToCSSValue): Use CSSValueListBuilder.
(WebCore::counterToCSSValue): Ditto.
(WebCore::fontFamilyList): Ditto.
(WebCore::ComputedStyleExtractor::fontVariantShorthandValue): Ditto.
(WebCore::fontSynthesis): Ditto.
(WebCore::shapePropertyValue): Use CSSValueList create functions instead of
append.
(WebCore::valueForItemPositionWithOverflowAlignment): Use CSSValueListBuilder.
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): Ditto.
(WebCore::valueForOffsetRotate): Use CSSValueList create functions instead of
append.
(WebCore::valueForOffsetShorthand): Use CSSValueListBuilder
(WebCore::paintOrder): Ditto.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle): Ditto.
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
Ditto.
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor2SidesShorthand):
Ditto.
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor4SidesShorthand):
Ditto.
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand): Ditto.
(WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): Ditto.
(WebCore::ComputedStyleExtractor::getMaskShorthandValue): Ditto.
* Source/WebCore/css/ComputedStyleExtractor.h: Use CSSValueListBuilder.

* Source/WebCore/css/DOMMatrixReadOnly.cpp:
(WebCore::DOMMatrixReadOnly::parseStringIntoAbstractMatrix): Use CSSValue::valueID.

* Source/WebCore/css/DeprecatedCSSOMValueList.h:
(WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList): Updated for
change to CSSValueList iteration.

* Source/WebCore/css/FontFace.cpp:
(WebCore::FontFace::setFamily): Use CSSValueList create functions instead of
append.

* Source/WebCore/css/FontVariantBuilder.cpp:
(WebCore::extractFontVariantLigatures): Use CSSValue::valueID.
(WebCore::extractFontVariantNumeric): Ditto.
(WebCore::extractFontVariantEastAsian): Ditto.

* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::LayerValues::set): Use more const.
(WebCore::ShorthandSerializer::serializeLayered const): Use unsigned
for layer count instead of size_t.
(WebCore::ShorthandSerializer::serializeGridTemplate const): Updated for
change to CSSValueList iteration.

* Source/WebCore/css/TransformFunctions.cpp:
(WebCore::transformForValue): Use CSSValueList::operator[].
(WebCore::translateForValue): Ditto.
(WebCore::scaleForValue): Ditto.
(WebCore::rotateForValue): Ditto.

* Source/WebCore/css/parser/CSSParserFastPaths.cpp:
(WebCore::checkForValidDouble): Removed extraneous const.
(WebCore::parseDouble): Ditto.
(WebCore::parseColorIntOrPercentage): Ditto.
(WebCore::isTenthAlpha): Ditto.
(WebCore::parseAlphaValue): Ditto.
(WebCore::parseTransformTranslateArguments): Use CSSValueListBuilder.
(WebCore::parseTransformAngleArgument): Use a return value instead of
appending to a passed in CSSFunctionValue.
(WebCore::parseTransformNumberArguments): Use CSSValueListBuilder.
(WebCore::parseSimpleTransformValue): Ditto.
(WebCore::parseSimpleTransformList): Ditto.

* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeFontPaletteValuesRule): Updated for
change to CSSValueList iteration.
(WebCore::CSSParserImpl::consumePropertyRule): Use CSSValue::valueID.

* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeCustomPropertyValueWithSyntax):
Use CSSValueListBuilder.
(WebCore::isValidAnimationPropertyList): Ditto.
(WebCore::CSSPropertyParser::consumeAnimationShorthand): Ditto.
(WebCore::addBackgroundValue): Deleted.
(WebCore::consumeBackgroundPosition): Ditto.
(WebCore::CSSPropertyParser::consumeBackgroundShorthand): Ditto.
(WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns): Ditto.
(WebCore::consumeImplicitGridAutoFlow): Use CSSValueList create functions
instead of append. Also use CSSValueID.
(WebCore::CSSPropertyParser::consumeGridShorthand): Updated for change to
consumeImplicitGridAutoFlow.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeImageSet): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction): Pass argument to
CSSFunctionValue::create.
(WebCore::CSSPropertyParserHelpers::consumeFilter): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeAspectRatioValue): Use CSSValueList
create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeAspectRatio): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeWillChange): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeQuotes): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeFontVariantEastAsian): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeCounter): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeSize): Use CSSValueList create
function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeTextIndent): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeMarginTrim): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeTouchAction): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeTextDecorationLine): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeTextEmphasisStyle): Use CSSValueList
create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeTranslate3d): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeNumbers): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeNumbersOrPercents): Ditto.
(WebCore::CSSPropertyParserHelpers::consumePerspectiveFunctionArgument): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeTransformFunction): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeTransform): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeTranslate): Use CSSValueList create
function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeScale): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeRotate): Ditto.
(WebCore::CSSPropertyParserHelpers::consumePaintStroke): Ditto.
(WebCore::CSSPropertyParserHelpers::consumePaintOrder): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeStrokeDasharray): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeCursor): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeContent): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeScrollSnapAlign): Use CSSValueList
create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeScrollSnapType): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeTextEdge): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeBasicShapeOrBox): Use
CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeShapeOutside): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeAlignTracks): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeJustifyTracks): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeGridAutoFlow): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeMasonryAutoFlow): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeFitContent): Use CSSFunctionValue
create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeGridLine): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeGridTrackSize): Use CSSFunctionValue
create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeGridLineNames): Use a vector of
strings instead of CSS values.
(WebCore::CSSPropertyParserHelpers::consumeGridTrackRepeatFunction): Use
CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeSubgridNameRepeatFunction): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeGridTrackList): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeContainerName): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeSpeakAs): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeHangingPunctuation): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeContain): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeContainIntrinsicSize): Use
CSSValueList create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeTextEmphasisPosition): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeColorScheme): Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeFontFaceFontFamily): Use
CSSValueList create function instead of append.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleNegative): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeCounterStylePad): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleSymbols): Use
CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleAdditiveSymbols):
Use CSSValueList create function instead of append.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.h: Removed declaration
of consumeAspectRatioValue. Updated for changes above.
(WebCore::CSSPropertyParserHelpers::assignOrDowngradeToListAndAppend): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeCommaSeparatedListWithSingleValueOptimization):
Use CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpers::consumeCommaSeparatedListWithoutSingleValueOptimization):
Ditto.

* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp:
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrc): Use
CSSValueListBuilder.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStyleRange): Use
CSSValueList create functions instead of append.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontWeightAbsoluteRange):
Ditto.
(WebCore::CSSPropertyParserHelpersWorkerSafe::fontStretchIsWithinRange): Deleted.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStretch): Removed unneeded
fontStretchIsWithinRange check.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontStretchRange): Ditto.
Use CSSValueList create functions instead of append.
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceUnicodeRange): Use
CSSValueListBuilder.

* Source/WebCore/css/process-css-properties.py: Use CSSValue::valueID.

* Source/WebCore/css/typedom/CSSStyleValueFactory.cpp:
(WebCore::CSSStyleValueFactory::parseStyleValue): Updated for change to
CSSValueList iteration.
(WebCore::CSSStyleValueFactory::reifyValue): Ditto.
* Source/WebCore/css/typedom/CSSStyleValueFactory.h: Updated for above.

* Source/WebCore/css/typedom/StylePropertyMap.cpp:
(WebCore::cssValueFromStyleValues): Use CSSValueListBuilder.
(WebCore::StylePropertyMap::append): Ditto.

* Source/WebCore/css/typedom/StylePropertyMapReadOnly.cpp:
(WebCore::StylePropertyMapReadOnly::reifyValueToVector): Updated for
change to CSSValueList iteration.

* Source/WebCore/css/typedom/transform/CSSMatrixComponent.cpp:
(WebCore::CSSMatrixComponent::create): Updated for change to CSSValueList
iteration.
(WebCore::CSSMatrixComponent::toCSSValue const): Use CSSValueListBuilder.

* Source/WebCore/css/typedom/transform/CSSPerspective.cpp:
(WebCore::CSSPerspective::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSRotate.cpp:
(WebCore::CSSRotate::create): Updated for change to CSSValueList iteration.
(WebCore::CSSRotate::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSScale.cpp:
(WebCore::CSSScale::create): Updated for change to CSSValueList iteration.
(WebCore::CSSScale::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSSkew.cpp:
(WebCore::CSSSkew::create): Updated for change to CSSValueList iteration.
(WebCore::CSSSkew::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSSkewX.cpp:
(WebCore::CSSSkewX::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSSkewY.cpp:
(WebCore::CSSSkewY::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSTransformValue.cpp:
(WebCore::CSSTransformValue::create): Updated for change to CSSValueList
iteration.
(WebCore::CSSTransformValue::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/css/typedom/transform/CSSTransformValue.h: Take a
const&.

* Source/WebCore/css/typedom/transform/CSSTranslate.cpp:
(WebCore::CSSTranslate::create): Updated for change to CSSValueList iteration.
(WebCore::CSSTranslate::toCSSValue const): Use CSSFunctionValue create
function instead of append.

* Source/WebCore/editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier): Deleted.
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Use valueID.
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Ditto.
(WebCore::highestEmbeddingAncestor): Ditto.

* Source/WebCore/editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::smartDeleteParagraphSpacers):
Fixed "seperator" spelling error.

* Source/WebCore/editing/EditingStyle.cpp:
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle const):
Use StyleProperties::propertyAsValueID.
(WebCore::removeAll): Added.
(WebCore::contains): Added.
(WebCore::EditingStyle::textDirection const): Use
StyleProperties::propertyAsValueID.
(WebCore::applyTextDecorationChangeToValueList): Use CSSValueListBuilder.
(WebCore::EditingStyle::overrideTypingStyleAt): Ditto.
(WebCore::textDecorationValueList): Use dynamicDowncast.
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
Use CSSValueListBuilder.
(WebCore::EditingStyle::prepareToApplyAt): Use CSSValue::valueID.
(WebCore::mergeTextDecorationValues): Use CSSValueListBuilder.
(WebCore::EditingStyle::mergeStyle): Use CSSValueList::copyValues.
(WebCore::EditingStyle::textDirectionForSelection): Use valueID.
(WebCore::StyleChange::StyleChange): Use CSSValueListBuilder.
(WebCore::StyleChange::extractTextStyles): Ditto.
(WebCore::diffTextDecorations): Ditto.

* Source/WebCore/editing/FontAttributeChanges.cpp:
(WebCore::cssValueListForShadow): Use CSSValueList create functions instead of
append.

* Source/WebCore/editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone): Use propertyAsValueID.

* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::addParsedWidthAndHeightToAspectRatioList): Use
CSSValueList create functions instead of append.

* Source/WebCore/inspector/InspectorOverlay.cpp:
(WebCore::authoredGridTrackSizes): Updated for change to CSSValueList
iteration.

* Source/WebCore/platform/animation/TimingFunction.cpp:
(WebCore::TimingFunction::createFromCSSValue): Use CSSValue::valueID.

* Source/WebCore/rendering/style/StyleImageSet.cpp:
(WebCore::StyleImageSet::computedStyleValue const): Use CSSValueListBuilder.

* Source/WebCore/style/FilterOperationsBuilder.cpp:
(WebCore::Style::createFilterOperations): Updated for change to CSSValueList
iteration.

* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertLengthOrAuto): Use CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertLengthMaxSizing): Ditto.
(WebCore::Style::BuilderConverter::convertTextDecorationLine): Updated for
change to CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertNumberOrAuto): Use CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertColorScheme): Updated for change to
CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertStringOrAuto): Use CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertStringOrNone): Ditto.
(WebCore::Style::BuilderConverter::convertTextEmphasisPosition): Updated for
change to CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertPathOperation): Use CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertReflection): Ditto.
(WebCore::Style::BuilderConverter::convertLineBoxContain): Ditto.
(WebCore::Style::BuilderConverter::convertShapeValue): Ditto.
(WebCore::Style::BuilderConverter::createGridTrackList): Don't create a
CSSValueList just so we can iterate it later.
(WebCore::Style::BuilderConverter::createGridPosition): Updated for change to
CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertContentAlignmentDataList): Ditto.
(WebCore::Style::BuilderConverter::convertFontFeatureSettings): Ditto.
(WebCore::Style::BuilderConverter::convertFontStyleFromValue): Use
CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertFontVariationSettings): Updated for
change to CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertTouchAction): Ditto.
(WebCore::Style::BuilderConverter::convertOverflowScrolling): Use
CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertSmoothScrolling): Ditto.
(WebCore::Style::BuilderConverter::convertPaintOrder): Use CSSValue::valueID
and CSSValueList::operator[].
(WebCore::Style::BuilderConverter::convertGlyphOrientationOrAuto): Ditto.
(WebCore::Style::BuilderConverter::convertSpeakAs): Updated for change to
CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertHangingPunctuation): Ditto.
(WebCore::Style::BuilderConverter::convertGapLength): Use CSSValue::valueID.
(WebCore::Style::BuilderConverter::convertContainerName): Updated for change to
CSSValueList iteration.
(WebCore::Style::BuilderConverter::convertMarginTrim): Ditto.

* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::getPageSizeFromName): Use const&.
(WebCore::Style::BuilderCustom::applyValueSize): Use CSSValue::valueID and
updated for change to CSSValueList iteration.
(WebCore::Style::BuilderCustom::applyValueTextIndent): Ditto.
(WebCore::Style::BuilderCustom::applyValueLineHeight): Ditto.
(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue): Ditto.
(WebCore::Style::BuilderCustom::applyValueFontFamily): Ditto.
(WebCore::Style::BuilderCustom::applyValueAspectRatio): Ditto.
(WebCore::Style::BuilderCustom::applyValueContain): Ditto.
(WebCore::Style::BuilderCustom::applyValueTextEmphasisStyle): Ditto.
(WebCore::Style::BuilderCustom::applyValueCounter): Ditto.
(WebCore::Style::BuilderCustom::applyValueCursor): Ditto.
(WebCore::Style::BuilderCustom::applyValueContent): Ditto.
(WebCore::Style::BuilderCustom::applyValueFontVariantLigatures): Ditto.
(WebCore::Style::BuilderCustom::applyValueFontVariantNumeric): Ditto.
(WebCore::Style::BuilderCustom::applyValueFontVariantEastAsian): Ditto.
(WebCore::Style::BuilderCustom::applyValueGridTemplateAreas): Ditto.
(WebCore::Style::BuilderCustom::applyValueWillChange): Ditto.

* Source/WebCore/svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace): Use CSSValueList create
functions instead of append. Updated for change to CSSValueList iteration.

* Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm:
(-[WKPDFHUDView mouseDown:]): Fixed "seperator" spelling error.
(-[WKPDFHUDView _setupLayer:]): Ditto.

* Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp:
(TestWebKitAPI::computeNumberOfTracks): Updated for change to CSSValueList
iteration.

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




More information about the webkit-changes mailing list