WebKit Bugzilla
Attachment 371975 Details for
Bug 198680
: Automate generation of computedProperties
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
CSSComputedStyleDeclaration.cpp.diff (macOS)
CSSComputedStyleDeclaration.cpp.diff (text/plain), 13.37 KB, created by
Devin Rousso
on 2019-06-12 11:20:15 PDT
(
hide
)
Description:
CSSComputedStyleDeclaration.cpp.diff (macOS)
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-06-12 11:20:15 PDT
Size:
13.37 KB
patch
obsolete
>diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 4bc064f776a..0162f797f56 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -88,12 +88,12 @@ namespace WebCore { > > WTF_MAKE_ISO_ALLOCATED_IMPL(CSSComputedStyleDeclaration); > >-// List of all properties we know how to compute, omitting shorthands. >-static const CSSPropertyID computedProperties[] = { >+static const CSSPropertyID computedPropertyIDs[] = { > CSSPropertyAlignContent, > CSSPropertyAlignItems, > CSSPropertyAlignSelf, > CSSPropertyAlignmentBaseline, >+ CSSPropertyAll, > CSSPropertyAlt, > CSSPropertyAnimationDelay, > CSSPropertyAnimationDirection, >@@ -109,10 +109,17 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyBackgroundColor, > CSSPropertyBackgroundImage, > CSSPropertyBackgroundOrigin, >- CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard >+ CSSPropertyBackgroundPositionX, >+ CSSPropertyBackgroundPositionY, > CSSPropertyBackgroundRepeat, > CSSPropertyBackgroundSize, > CSSPropertyBaselineShift, >+ CSSPropertyBorderBlock, >+ CSSPropertyBorderBlockColor, >+ CSSPropertyBorderBlockEnd, >+ CSSPropertyBorderBlockStart, >+ CSSPropertyBorderBlockStyle, >+ CSSPropertyBorderBlockWidth, > CSSPropertyBorderBottomColor, > CSSPropertyBorderBottomLeftRadius, > CSSPropertyBorderBottomRightRadius, >@@ -124,6 +131,12 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyBorderImageSlice, > CSSPropertyBorderImageSource, > CSSPropertyBorderImageWidth, >+ CSSPropertyBorderInline, >+ CSSPropertyBorderInlineColor, >+ CSSPropertyBorderInlineEnd, >+ CSSPropertyBorderInlineStart, >+ CSSPropertyBorderInlineStyle, >+ CSSPropertyBorderInlineWidth, > CSSPropertyBorderLeftColor, > CSSPropertyBorderLeftStyle, > CSSPropertyBorderLeftWidth, >@@ -138,6 +151,9 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyBottom, > CSSPropertyBoxShadow, > CSSPropertyBoxSizing, >+ CSSPropertyBreakAfter, >+ CSSPropertyBreakBefore, >+ CSSPropertyBreakInside, > CSSPropertyBufferedRendering, > CSSPropertyCaptionSide, > CSSPropertyCaretColor, >@@ -149,9 +165,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyColorInterpolation, > CSSPropertyColorInterpolationFilters, > CSSPropertyColorRendering, >-#if ENABLE(DARK_MODE_CSS) > CSSPropertyColorScheme, >-#endif > CSSPropertyColumnCount, > CSSPropertyColumnFill, > CSSPropertyColumnGap, >@@ -176,7 +190,6 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyFilter, > CSSPropertyFlexBasis, > CSSPropertyFlexDirection, >- CSSPropertyFlexFlow, > CSSPropertyFlexGrow, > CSSPropertyFlexShrink, > CSSPropertyFlexWrap, >@@ -184,23 +197,19 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyFloodColor, > CSSPropertyFloodOpacity, > CSSPropertyFontFamily, >-#if ENABLE(VARIATION_FONTS) >+ CSSPropertyFontFeatureSettings, > CSSPropertyFontOpticalSizing, >-#endif > CSSPropertyFontSize, > CSSPropertyFontStretch, > CSSPropertyFontStyle, > CSSPropertyFontSynthesis, >- CSSPropertyFontVariant, > CSSPropertyFontVariantAlternates, > CSSPropertyFontVariantCaps, > CSSPropertyFontVariantEastAsian, > CSSPropertyFontVariantLigatures, > CSSPropertyFontVariantNumeric, > CSSPropertyFontVariantPosition, >-#if ENABLE(VARIATION_FONTS) > CSSPropertyFontVariationSettings, >-#endif > CSSPropertyFontWeight, > CSSPropertyGlyphOrientationHorizontal, > CSSPropertyGlyphOrientationVertical, >@@ -216,16 +225,10 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyGridTemplateRows, > CSSPropertyHangingPunctuation, > CSSPropertyHeight, >-#if ENABLE(CSS_IMAGE_ORIENTATION) >- CSSPropertyImageOrientation, >-#endif > CSSPropertyImageRendering, >-#if ENABLE(CSS_IMAGE_RESOLUTION) >- CSSPropertyImageResolution, >-#endif >-#if ENABLE(CSS_COMPOSITING) >+ CSSPropertyInsetBlock, >+ CSSPropertyInsetInline, > CSSPropertyIsolation, >-#endif > CSSPropertyJustifyContent, > CSSPropertyJustifyItems, > CSSPropertyJustifySelf, >@@ -238,7 +241,9 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyListStyleImage, > CSSPropertyListStylePosition, > CSSPropertyListStyleType, >+ CSSPropertyMarginBlock, > CSSPropertyMarginBottom, >+ CSSPropertyMarginInline, > CSSPropertyMarginLeft, > CSSPropertyMarginRight, > CSSPropertyMarginTop, >@@ -251,9 +256,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyMaxWidth, > CSSPropertyMinHeight, > CSSPropertyMinWidth, >-#if ENABLE(CSS_COMPOSITING) > CSSPropertyMixBlendMode, >-#endif > CSSPropertyObjectFit, > CSSPropertyObjectPosition, > CSSPropertyOpacity, >@@ -266,7 +269,9 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyOverflowWrap, > CSSPropertyOverflowX, > CSSPropertyOverflowY, >+ CSSPropertyPaddingBlock, > CSSPropertyPaddingBottom, >+ CSSPropertyPaddingInline, > CSSPropertyPaddingLeft, > CSSPropertyPaddingRight, > CSSPropertyPaddingTop, >@@ -275,36 +280,32 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyPageBreakInside, > CSSPropertyPaintOrder, > CSSPropertyPerspective, >- CSSPropertyPerspectiveOrigin, >- CSSPropertyPlaceContent, >- CSSPropertyPlaceItems, >- CSSPropertyPlaceSelf, >+ CSSPropertyPerspectiveOriginX, >+ CSSPropertyPerspectiveOriginY, > CSSPropertyPointerEvents, > CSSPropertyPosition, >+ CSSPropertyQuotes, > CSSPropertyR, > CSSPropertyResize, > CSSPropertyRight, > CSSPropertyRowGap, > CSSPropertyRx, > CSSPropertyRy, >-#if ENABLE(CSS_SCROLL_SNAP) >- CSSPropertyScrollPadding, > CSSPropertyScrollPaddingBottom, > CSSPropertyScrollPaddingLeft, > CSSPropertyScrollPaddingRight, > CSSPropertyScrollPaddingTop, > CSSPropertyScrollSnapAlign, >- CSSPropertyScrollSnapMargin, > CSSPropertyScrollSnapMarginBottom, > CSSPropertyScrollSnapMarginLeft, > CSSPropertyScrollSnapMarginRight, > CSSPropertyScrollSnapMarginTop, > CSSPropertyScrollSnapType, >-#endif > CSSPropertyShapeImageThreshold, > CSSPropertyShapeMargin, > CSSPropertyShapeOutside, > CSSPropertyShapeRendering, >+ CSSPropertySize, > CSSPropertySpeakAs, > CSSPropertyStopColor, > CSSPropertyStopOpacity, >@@ -326,19 +327,21 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyTextDecorationLine, > CSSPropertyTextDecorationSkip, > CSSPropertyTextDecorationStyle, >+ CSSPropertyTextDecorationThickness, > CSSPropertyTextIndent, > CSSPropertyTextOverflow, > CSSPropertyTextRendering, > CSSPropertyTextShadow, > CSSPropertyTextTransform, >+ CSSPropertyTextUnderlineOffset, > CSSPropertyTextUnderlinePosition, > CSSPropertyTop, >-#if ENABLE(POINTER_EVENTS) > CSSPropertyTouchAction, >-#endif > CSSPropertyTransform, > CSSPropertyTransformBox, >- CSSPropertyTransformOrigin, >+ CSSPropertyTransformOriginX, >+ CSSPropertyTransformOriginY, >+ CSSPropertyTransformOriginZ, > CSSPropertyTransformStyle, > CSSPropertyTransitionDelay, > CSSPropertyTransitionDuration, >@@ -361,10 +364,12 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyZIndex, > CSSPropertyZoom, > CSSPropertyAppleColorFilter, >+ CSSPropertyApplePayButtonStyle, >+ CSSPropertyApplePayButtonType, >+ CSSPropertyAppleTrailingWord, > CSSPropertyWebkitAppearance, >-#if ENABLE(FILTERS_LEVEL_2) >+ CSSPropertyWebkitAspectRatio, > CSSPropertyWebkitBackdropFilter, >-#endif > CSSPropertyWebkitBackfaceVisibility, > CSSPropertyWebkitBackgroundClip, > CSSPropertyWebkitBackgroundComposite, >@@ -375,9 +380,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyWebkitBorderImage, > CSSPropertyWebkitBorderVerticalSpacing, > CSSPropertyWebkitBoxAlign, >-#if ENABLE(CSS_BOX_DECORATION_BREAK) > CSSPropertyWebkitBoxDecorationBreak, >-#endif > CSSPropertyWebkitBoxDirection, > CSSPropertyWebkitBoxFlex, > CSSPropertyWebkitBoxFlexGroup, >@@ -393,9 +396,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyWebkitColumnBreakBefore, > CSSPropertyWebkitColumnBreakInside, > CSSPropertyWebkitColumnProgression, >-#if ENABLE(CURSOR_VISIBILITY) > CSSPropertyWebkitCursorVisibility, >-#endif > CSSPropertyWebkitFontKerning, > CSSPropertyWebkitFontSmoothing, > CSSPropertyWebkitHyphenateCharacter, >@@ -412,9 +413,12 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyWebkitLocale, > CSSPropertyWebkitMarginAfterCollapse, > CSSPropertyWebkitMarginBeforeCollapse, >+ CSSPropertyWebkitMarginBottomCollapse, >+ CSSPropertyWebkitMarginTopCollapse, > CSSPropertyWebkitMarqueeDirection, > CSSPropertyWebkitMarqueeIncrement, > CSSPropertyWebkitMarqueeRepetition, >+ CSSPropertyWebkitMarqueeSpeed, > CSSPropertyWebkitMarqueeStyle, > CSSPropertyWebkitMaskBoxImage, > CSSPropertyWebkitMaskBoxImageOutset, >@@ -426,49 +430,32 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyWebkitMaskComposite, > CSSPropertyWebkitMaskImage, > CSSPropertyWebkitMaskOrigin, >- CSSPropertyWebkitMaskPosition, >+ CSSPropertyWebkitMaskPositionX, >+ CSSPropertyWebkitMaskPositionY, > CSSPropertyWebkitMaskRepeat, > CSSPropertyWebkitMaskSize, > CSSPropertyWebkitMaskSourceType, > CSSPropertyWebkitNbspMode, >-#if ENABLE(OVERFLOW_SCROLLING_TOUCH) >- CSSPropertyWebkitOverflowScrolling, >-#endif > CSSPropertyWebkitPrintColorAdjust, > CSSPropertyWebkitRtlOrdering, >-#if ENABLE(TOUCH_EVENTS) >- CSSPropertyWebkitTapHighlightColor, >-#endif >-#if ENABLE(CSS3_TEXT) >- CSSPropertyWebkitTextAlignLast, >-#endif >+ CSSPropertyWebkitRubyPosition, > CSSPropertyWebkitTextCombine, >- CSSPropertyWebkitTextDecorationsInEffect, > CSSPropertyWebkitTextEmphasisColor, > CSSPropertyWebkitTextEmphasisPosition, > CSSPropertyWebkitTextEmphasisStyle, > CSSPropertyWebkitTextFillColor, >-#if ENABLE(CSS3_TEXT) >- CSSPropertyWebkitTextJustify, >-#endif > CSSPropertyWebkitTextOrientation, > CSSPropertyWebkitTextSecurity, >-#if ENABLE(TEXT_AUTOSIZING) > CSSPropertyWebkitTextSizeAdjust, >-#endif > CSSPropertyWebkitTextStrokeColor, > CSSPropertyWebkitTextStrokeWidth, > CSSPropertyWebkitTextZoom, >-#if PLATFORM(IOS_FAMILY) >- CSSPropertyWebkitTouchCallout, >-#endif > CSSPropertyWebkitTransformStyle, > CSSPropertyWebkitUserDrag, > CSSPropertyWebkitUserModify, > CSSPropertyWebkitUserSelect, > }; >- >-const unsigned numComputedProperties = WTF_ARRAY_LENGTH(computedProperties); >+const size_t numComputedPropertyIDs = 365; > > static CSSValueID valueForRepeatRule(int rule) > { >@@ -1686,12 +1673,12 @@ String CSSComputedStyleDeclaration::cssText() const > { > StringBuilder result; > >- for (unsigned i = 0; i < numComputedProperties; i++) { >+ for (unsigned i = 0; i < numComputedPropertyIDs; i++) { > if (i) > result.append(' '); >- result.append(getPropertyName(computedProperties[i])); >+ result.append(getPropertyName(computedPropertyIDs[i])); > result.appendLiteral(": "); >- result.append(getPropertyValue(computedProperties[i])); >+ result.append(getPropertyValue(computedPropertyIDs[i])); > result.append(';'); > } > >@@ -4220,31 +4207,31 @@ unsigned CSSComputedStyleDeclaration::length() const > if (!style) > return 0; > >- return numComputedProperties + style->inheritedCustomProperties().size() + style->nonInheritedCustomProperties().size(); >+ return numComputedPropertyIDs + style->inheritedCustomProperties().size() + style->nonInheritedCustomProperties().size(); > } > > String CSSComputedStyleDeclaration::item(unsigned i) const > { > if (i >= length()) > return String(); >- >- if (i < numComputedProperties) >- return getPropertyNameString(computedProperties[i]); >- >+ >+ if (i < numComputedPropertyIDs) >+ return getPropertyNameString(computedPropertyIDs[i]); >+ > auto* style = m_element->computedStyle(m_pseudoElementSpecifier); > if (!style) > return String(); > > const auto& inheritedCustomProperties = style->inheritedCustomProperties(); > >- if (i < numComputedProperties + inheritedCustomProperties.size()) { >+ if (i < numComputedPropertyIDs + inheritedCustomProperties.size()) { > auto results = copyToVector(inheritedCustomProperties.keys()); >- return results.at(i - numComputedProperties); >+ return results.at(i - numComputedPropertyIDs); > } > > const auto& nonInheritedCustomProperties = style->nonInheritedCustomProperties(); > auto results = copyToVector(nonInheritedCustomProperties.keys()); >- return results.at(i - inheritedCustomProperties.size() - numComputedProperties); >+ return results.at(i - inheritedCustomProperties.size() - numComputedPropertyIDs); > } > > bool ComputedStyleExtractor::propertyMatches(CSSPropertyID propertyID, const CSSValue* value) >@@ -4267,7 +4254,7 @@ bool ComputedStyleExtractor::propertyMatches(CSSPropertyID propertyID, const CSS > > Ref<MutableStyleProperties> ComputedStyleExtractor::copyProperties() > { >- return copyPropertiesInSet(computedProperties, numComputedProperties); >+ return copyPropertiesInSet(computedPropertyIDs, numComputedPropertyIDs); > } > > Ref<CSSValueList> ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand& shorthand)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 198680
:
371670
|
371671
|
371672
|
371673
|
371674
|
371675
|
371676
|
371677
|
371679
|
371680
|
371684
|
371685
|
371698
|
371699
|
371775
|
371787
|
371788
|
371791
|
371794
|
371795
|
371796
|
371797
|
371803
|
371807
|
371808
|
371810
|
371815
|
371899
|
371901
|
371904
|
371907
|
371910
|
371911
|
371913
|
371916
|
371926
|
371927
|
371928
|
371931
| 371975 |
371977
|
372101
|
381834