WebKit Bugzilla
Attachment 348270 Details for
Bug 189041
: Web Inspector: generate CSSKeywordCompletions from backend values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[Patch] WIP
bug-189041-20180828002640.patch (text/plain), 48.23 KB, created by
Devin Rousso
on 2018-08-28 00:26:40 PDT
(
hide
)
Description:
[Patch] WIP
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2018-08-28 00:26:40 PDT
Size:
48.23 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index f4798da7489b75fdb9b6ea6140716eba19a32a8a..954438e620b4fa0589d694176ad9870fe0d7b9bd 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-28 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: generate CSSKeywordCompletions from backend values >+ https://bugs.webkit.org/show_bug.cgi?id=189041 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/protocol/CSS.json: >+ Include an optional `inherited` boolean for `CSSPropertyInfo`. >+ > 2018-08-27 Mark Lam <mark.lam@apple.com> > > Fix exception throwing code so that topCallFrame and topEntryFrame stay true to their names. >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0de7967d76f856b7ea655f2715e5c747ba3d98cb..16347a77145049348a2229d0dff0dffb8658e555 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-08-28 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: generate CSSKeywordCompletions from backend values >+ https://bugs.webkit.org/show_bug.cgi?id=189041 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Modified by existing test inspector/css/getSupportedCSSProperties.html. >+ >+ * inspector/agents/InspectorCSSAgent.cpp: >+ (WebCore::InspectorCSSAgent::getSupportedCSSProperties): >+ >+ * css/makevalues.pl: >+ Create additional helper functions/constants for retrieving strings of each CSS keyword. >+ >+ * css/CSSPrimitiveValue.cpp: >+ (WebCore::valueName): >+ >+ * css/CSSValuePool.cpp: >+ (WebCore::CSSValuePool::CSSValuePool): >+ (WebCore::CSSValuePool::createIdentifierValue): >+ > 2018-08-27 Justin Fan <justin_fan@apple.com> > > WebGL 2 conformance: framebuffer-test >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index aca81e50605fd17f184bba6c95518eab29c53ad0..598df1257fa30b945e2d3cdb6539824a6ac8e171 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-28 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: generate CSSKeywordCompletions from backend values >+ https://bugs.webkit.org/show_bug.cgi?id=189041 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Models/CSSCompletions.js: >+ (WI.CSSCompletions.requestCSSCompletions.propertyNamesCallback): >+ >+ * UserInterface/Models/CSSKeywordCompletions.js: >+ (WI.CSSKeywordCompletions.forProperty): >+ (WI.CSSKeywordCompletions.addCustomCompletions): >+ >+ * UserInterface/Models/CSSProperty.js: >+ (WI.CSSProperty.isInheritedPropertyName): >+ > 2018-08-27 Keith Rollin <krollin@apple.com> > > Unreviewed build fix -- disable LTO for production builds >diff --git a/Source/JavaScriptCore/inspector/protocol/CSS.json b/Source/JavaScriptCore/inspector/protocol/CSS.json >index 0e8b0803ac2b789e56da3ecd231bfefd5a81e8a1..8112b1efa1c0321c0c65c8e557893ad4dc382284 100644 >--- a/Source/JavaScriptCore/inspector/protocol/CSS.json >+++ b/Source/JavaScriptCore/inspector/protocol/CSS.json >@@ -152,7 +152,8 @@ > "properties": [ > { "name": "name", "type": "string", "description": "Property name." }, > { "name": "longhands", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Longhand property names." }, >- { "name": "values", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Supported values for this property." } >+ { "name": "values", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Supported values for this property." }, >+ { "name": "inherited", "type": "boolean", "optional": true, "description": "Whether the property is able to be inherited." } > ] > }, > { >diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp >index c60d1b4e1ba9564d156b4f79f8484662631628af..56044bece0f7a83c2325624400584c4bd3176531 100644 >--- a/Source/WebCore/css/CSSPrimitiveValue.cpp >+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp >@@ -277,17 +277,9 @@ static const AtomicString& propertyName(CSSPropertyID propertyID) > > static const AtomicString& valueName(CSSValueID valueID) > { >- ASSERT_ARG(valueID, valueID >= 0); >- ASSERT_ARG(valueID, valueID < numCSSValueKeywords); >+ ASSERT_ARG(valueID, (valueID >= firstCSSValueKeyword && valueID <= lastCSSValueKeyword)); > >- if (valueID < 0) >- return nullAtom(); >- >- static AtomicString* keywordStrings = new AtomicString[numCSSValueKeywords]; // Leaked intentionally. >- AtomicString& keywordString = keywordStrings[valueID]; >- if (keywordString.isNull()) >- keywordString = getValueName(valueID); >- return keywordString; >+ return getValueNameAtomicString(valueID); > } > > CSSPrimitiveValue::CSSPrimitiveValue(CSSValueID valueID) >diff --git a/Source/WebCore/css/CSSValuePool.cpp b/Source/WebCore/css/CSSValuePool.cpp >index e249330861ad2ceabecd750168f1f8ab3cb3c6ca..235f76f75566fc8dd5ac5c220658885623d38bed 100644 >--- a/Source/WebCore/css/CSSValuePool.cpp >+++ b/Source/WebCore/css/CSSValuePool.cpp >@@ -51,7 +51,7 @@ CSSValuePool::CSSValuePool() > m_whiteColor.construct(Color(Color::white)); > m_blackColor.construct(Color(Color::black)); > >- for (unsigned i = 0; i < numCSSValueKeywords; ++i) >+ for (unsigned i = firstCSSValueKeyword; i <= lastCSSValueKeyword; ++i) > m_identifierValues[i].construct(static_cast<CSSValueID>(i)); > > for (unsigned i = 0; i < (maximumCacheableIntegerValue + 1); ++i) { >@@ -63,7 +63,7 @@ CSSValuePool::CSSValuePool() > > Ref<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CSSValueID ident) > { >- RELEASE_ASSERT(ident >= 0 && ident < numCSSValueKeywords); >+ RELEASE_ASSERT(ident >= firstCSSValueKeyword && ident <= lastCSSValueKeyword); > return m_identifierValues[ident].get(); > } > >diff --git a/Source/WebCore/css/makevalues.pl b/Source/WebCore/css/makevalues.pl >index 9b090eac4f44180ff1334446fabab47d5043e35c..ab200b2dc401edbeca3d858fd8a2d31ccd26f04a 100755 >--- a/Source/WebCore/css/makevalues.pl >+++ b/Source/WebCore/css/makevalues.pl >@@ -43,6 +43,7 @@ my @duplicates = (); > > my @names = (); > my @lower_names = (); >+my $numPredefinedProperties = 1; > > foreach (@NAMES) { > next if (m/(^\s*$)/); >@@ -69,10 +70,15 @@ print GPERF << "EOF"; > %{ > /* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */ > >+#include \"config.h\" > #include \"CSSValueKeywords.h\" > #include \"HashTools.h\" > #include <string.h> > >+#include <wtf/ASCIICType.h> >+#include <wtf/text/AtomicString.h> >+#include <wtf/text/WTFString.h> >+ > #if defined(__clang__) > #pragma clang diagnostic push > #pragma clang diagnostic ignored \"-Wunknown-pragmas\" >@@ -125,11 +131,31 @@ const Value* findValue(const char* str, unsigned int len) > > const char* getValueName(unsigned short id) > { >- if (id >= numCSSValueKeywords || id <= 0) >+ if (id <= 0 || id > lastCSSValueKeyword) > return 0; > return valueList[id]; > } > >+const AtomicString& getValueNameAtomicString(CSSValueID id) >+{ >+ if (id < firstCSSValueKeyword || id > lastCSSValueKeyword) >+ return nullAtom(); >+ >+ static AtomicString* valueKeywordStrings = new AtomicString[numCSSValueKeywords]; // Leaked intentionally. >+ AtomicString& valueKeywordString = valueKeywordStrings[id]; >+ if (valueKeywordString.isNull()) { >+ const char* valueName = valueList[id]; >+ valueKeywordString = AtomicString(valueName, strlen(valueName), AtomicString::ConstructFromLiteral); >+ } >+ return valueKeywordString; >+} >+ >+String getValueNameString(CSSValueID id) >+{ >+ // We share the StringImpl with the AtomicStrings. >+ return getValueNameAtomicString(id).string(); >+} >+ > } // namespace WebCore > > #if defined(__clang__) >@@ -146,6 +172,7 @@ print HEADER << "EOF"; > #pragma once > > #include <string.h> >+#include <wtf/Forward.h> > > namespace WebCore { > >@@ -153,7 +180,8 @@ enum CSSValueID { > CSSValueInvalid = 0, > EOF > >-my $i = 1; >+my $first = 0; # Include CSSValueInvalid in the total number of values >+my $i = $numPredefinedProperties; > my $maxLen = 0; > foreach my $name (@names) { > my $id = $name; >@@ -164,13 +192,25 @@ foreach my $name (@names) { > $maxLen = length($name); > } > } >+my $num = $i - $first; >+my $last = $i - 1; > > print HEADER "};\n\n"; >-print HEADER "const int numCSSValueKeywords = " . $i . ";\n"; >+print HEADER "const int firstCSSValueKeyword = $first;\n"; >+print HEADER "const int numCSSValueKeywords = $num;\n"; >+print HEADER "const int lastCSSValueKeyword = $last;\n"; > print HEADER "const size_t maxCSSValueKeywordLength = " . $maxLen . ";\n"; > print HEADER << "EOF"; > > const char* getValueName(unsigned short id); >+const WTF::AtomicString& getValueNameAtomicString(CSSValueID id); >+WTF::String getValueNameString(CSSValueID id); >+ >+inline CSSValueID convertToCSSValueID(int value) >+{ >+ ASSERT(value >= firstCSSValueKeyword && value <= lastCSSValueKeyword); >+ return static_cast<CSSValueID>(value); >+} > > } // namespace WebCore > EOF >diff --git a/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp b/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >index 206eae3e60e35b3afbc5d06a0dcaa3b6dfbc7dae..a1aab2d3ff5dbabbbb0dac8e754e8f0fb3f63328 100644 >--- a/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >@@ -28,12 +28,15 @@ > > #include "CSSComputedStyleDeclaration.h" > #include "CSSImportRule.h" >+#include "CSSParserFastPaths.h" >+#include "CSSParserMode.h" > #include "CSSPropertyNames.h" > #include "CSSPropertySourceData.h" > #include "CSSRule.h" > #include "CSSRuleList.h" > #include "CSSStyleRule.h" > #include "CSSStyleSheet.h" >+#include "CSSValueKeywords.h" > #include "ContentSecurityPolicy.h" > #include "DOMWindow.h" > #include "FontCache.h" >@@ -715,25 +718,38 @@ void InspectorCSSAgent::getSupportedCSSProperties(ErrorString&, RefPtr<JSON::Arr > { > auto properties = JSON::ArrayOf<Inspector::Protocol::CSS::CSSPropertyInfo>::create(); > for (int i = firstCSSProperty; i <= lastCSSProperty; ++i) { >- CSSPropertyID id = convertToCSSPropertyID(i); >- if (isInternalCSSProperty(id)) >+ CSSPropertyID propertyID = convertToCSSPropertyID(i); >+ if (isInternalCSSProperty(propertyID)) > continue; > > auto property = Inspector::Protocol::CSS::CSSPropertyInfo::create() >- .setName(getPropertyNameString(id)) >+ .setName(getPropertyNameString(propertyID)) > .release(); > >- const StylePropertyShorthand& shorthand = shorthandForProperty(id); >- if (!shorthand.length()) { >- properties->addItem(WTFMove(property)); >- continue; >+ const StylePropertyShorthand& shorthand = shorthandForProperty(propertyID); >+ if (shorthand.length()) { >+ auto longhands = JSON::ArrayOf<String>::create(); >+ for (unsigned j = 0; j < shorthand.length(); ++j) { >+ CSSPropertyID longhandID = shorthand.properties()[j]; >+ longhands->addItem(getPropertyNameString(longhandID)); >+ } >+ property->setLonghands(WTFMove(longhands)); > } >- auto longhands = JSON::ArrayOf<String>::create(); >- for (unsigned j = 0; j < shorthand.length(); ++j) { >- CSSPropertyID longhandID = shorthand.properties()[j]; >- longhands->addItem(getPropertyNameString(longhandID)); >+ >+ if (CSSParserFastPaths::isKeywordPropertyID(propertyID)) { >+ auto values = JSON::ArrayOf<String>::create(); >+ for (int j = firstCSSValueKeyword; j < lastCSSValueKeyword; ++j) { >+ CSSValueID valueID = convertToCSSValueID(j); >+ if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyID, valueID, HTMLStandardMode)) >+ values->addItem(getValueNameString(valueID)); >+ } >+ if (values->length()) >+ property->setValues(WTFMove(values)); > } >- property->setLonghands(WTFMove(longhands)); >+ >+ if (CSSProperty::isInheritedProperty(propertyID)) >+ property->setInherited(true); >+ > properties->addItem(WTFMove(property)); > } > cssProperties = WTFMove(properties); >diff --git a/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js b/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js >index 46433e7e5c9d6983a5886477b7594ae1a1288cae..4cd7c983ec54e9b76151f1b477ec962892c1557d 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js >+++ b/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js >@@ -91,6 +91,11 @@ WI.CSSCompletions = class CSSCompletions > > WI.CSSKeywordCompletions.addCustomCompletions(names); > >+ for (let name in WI.CSSKeywordCompletions._propertyKeywordMap) { >+ if (!WI.CSSCompletions.cssNameCompletions._values.includes(name)) >+ console.log(name); >+ } >+ > // CodeMirror is not included by tests so we shouldn't assume it always exists. > // If it isn't available we skip MIME type associations. > if (!window.CodeMirror) >diff --git a/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js b/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js >index a099c693d381a0bb1bd5041f6c1e75fd5e54e887..e7f7e3800da9df56e8438a66be3d35960224c32c 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js >+++ b/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js >@@ -49,9 +49,9 @@ WI.CSSKeywordCompletions.forProperty = function(propertyName) > acceptedKeywords = acceptedKeywords.concat(WI.CSSKeywordCompletions._colors); > > // Only suggest "inherit" on inheritable properties even though it is valid on all properties. >- if (propertyName in WI.CSSKeywordCompletions.InheritedProperties) >+ if (WI.CSSKeywordCompletions.InheritedProperties.has(propertyName)) > acceptedKeywords.push("inherit"); >- else if (isNotPrefixed && ("-webkit-" + propertyName) in WI.CSSKeywordCompletions.InheritedProperties) >+ else if (isNotPrefixed && WI.CSSKeywordCompletions.InheritedProperties.has("-webkit-" + propertyName)) > acceptedKeywords.push("inherit"); > > if (acceptedKeywords.includes(WI.CSSKeywordCompletions.AllPropertyNamesPlaceholder) && WI.CSSCompletions.cssNameCompletions) { >@@ -89,6 +89,8 @@ WI.CSSKeywordCompletions.addCustomCompletions = function(properties) > for (var property of properties) { > if (property.values) > WI.CSSKeywordCompletions.addPropertyCompletionValues(property.name, property.values); >+ if (property.inherited) >+ WI.CSSKeywordCompletions.InheritedProperties.add(property.name); > } > }; > >@@ -111,34 +113,7 @@ WI.CSSKeywordCompletions.addPropertyCompletionValues = function(propertyName, ne > > WI.CSSKeywordCompletions.AllPropertyNamesPlaceholder = "__all-properties__"; > >-WI.CSSKeywordCompletions.InheritedProperties = [ >- "azimuth", "border-collapse", "border-spacing", "caption-side", "clip-rule", "color", "color-interpolation", >- "color-interpolation-filters", "color-rendering", "cursor", "direction", "elevation", "empty-cells", "fill", >- "fill-opacity", "fill-rule", "font", "font-family", "font-size", "font-style", "font-variant", "font-variant-numeric", "font-weight", "font-optical-sizing", >- "glyph-orientation-horizontal", "glyph-orientation-vertical", "hanging-punctuation", "image-rendering", "kerning", "letter-spacing", >- "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "marker", "marker-end", >- "marker-mid", "marker-start", "orphans", "pitch", "pitch-range", "pointer-events", "quotes", "resize", "richness", >- "shape-rendering", "speak", "speak-header", "speak-numeral", "speak-punctuation", "speech-rate", "stress", "stroke", >- "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", >- "stroke-width", "tab-size", "text-align", "text-anchor", "text-decoration", "text-indent", "text-rendering", >- "text-shadow", "text-transform", "visibility", "voice-family", "volume", "white-space", "widows", "word-break", >- "word-spacing", "word-wrap", "writing-mode", "-webkit-aspect-ratio", "-webkit-border-horizontal-spacing", >- "-webkit-border-vertical-spacing", "-webkit-box-direction", "-webkit-color-correction", "font-feature-settings", >- "-webkit-font-kerning", "-webkit-font-smoothing", "-webkit-font-variant-ligatures", >- "-webkit-hyphenate-character", "-webkit-hyphenate-limit-after", "-webkit-hyphenate-limit-before", >- "-webkit-hyphenate-limit-lines", "-webkit-hyphens", "-webkit-line-align", "-webkit-line-box-contain", >- "-webkit-line-break", "-webkit-line-grid", "-webkit-line-snap", "-webkit-locale", "-webkit-nbsp-mode", >- "-webkit-print-color-adjust", "-webkit-rtl-ordering", "-webkit-text-combine", "-webkit-text-decorations-in-effect", >- "-webkit-text-emphasis", "-webkit-text-emphasis-color", "-webkit-text-emphasis-position", "-webkit-text-emphasis-style", >- "-webkit-text-fill-color", "-webkit-text-orientation", "-webkit-text-security", "-webkit-text-size-adjust", >- "-webkit-text-stroke", "-webkit-text-stroke-color", "-webkit-text-stroke-width", "-webkit-user-modify", >- "-webkit-user-select", "-webkit-writing-mode", "-webkit-cursor-visibility", "image-orientation", "image-resolution", >- "overflow-wrap", "-webkit-text-align-last", "-webkit-text-justify", "-webkit-ruby-position", "-webkit-text-decoration-line", >- "font-synthesis", >- >- // iOS Properties >- "-webkit-overflow-scrolling", "-webkit-touch-callout", "-webkit-tap-highlight-color" >-].keySet(); >+WI.CSSKeywordCompletions.InheritedProperties = new Set; > > WI.CSSKeywordCompletions._colors = [ > "aqua", "black", "blue", "fuchsia", "gray", "green", "lime", "maroon", "navy", "olive", "orange", "purple", "red", >@@ -174,91 +149,31 @@ WI.CSSKeywordCompletions._colorAwareProperties = [ > ].keySet(); > > WI.CSSKeywordCompletions._propertyKeywordMap = { >- "table-layout": [ >- "auto", "fixed" >- ], >- "visibility": [ >- "hidden", "visible", "collapse" >- ], >- "text-underline": [ >- "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave" >- ], > "content": [ > "list-item", "close-quote", "no-close-quote", "no-open-quote", "open-quote", "attr()", "counter()", "counters()", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "image-set()" > ], > "list-style-image": [ > "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "image-set()" > ], >- "clear": [ >- "none", "left", "right", "both" >- ], >- "fill-rule": [ >- "nonzero", "evenodd" >- ], >- "stroke-linecap": [ >- "butt", "round", "square" >- ], >- "stroke-linejoin": [ >- "round", "miter", "bevel" >- ], > "baseline-shift": [ > "baseline", "sub", "super" > ], > "border-bottom-width": [ > "medium", "thick", "thin", "calc()" > ], >- "margin-top-collapse": [ >- "collapse", "separate", "discard" >- ], >- "-webkit-box-orient": [ >- "horizontal", "vertical", "inline-axis", "block-axis" >- ], > "font-stretch": [ > "normal", "wider", "narrower", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", > "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" > ], >- "font-optical-sizing": [ >- "auto", "none", >- ], >- "-webkit-color-correction": [ >- "default", "srgb" >- ], > "border-left-width": [ > "medium", "thick", "thin", "calc()" > ], >- "-webkit-writing-mode": [ >- "lr", "rl", "tb", "lr-tb", "rl-tb", "tb-rl", "horizontal-tb", "vertical-rl", "vertical-lr", "horizontal-bt" >- ], >- "text-line-through-mode": [ >- "continuous", "skip-white-space" >- ], >- "text-overline-mode": [ >- "continuous", "skip-white-space" >- ], >- "text-underline-mode": [ >- "continuous", "skip-white-space" >- ], >- "text-line-through-style": [ >- "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave" >- ], >- "text-overline-style": [ >- "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave" >- ], >- "text-underline-style": [ >- "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave" >- ], >- "border-collapse": [ >- "collapse", "separate" >- ], > "border-top-width": [ > "medium", "thick", "thin", "calc()" > ], > "outline-color": [ > "invert", "-webkit-focus-ring-color" > ], >- "outline-style": [ >- "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double", "auto" >- ], > "cursor": [ > "auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", > "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", >@@ -305,102 +220,33 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "background-clip": [ > "border-box", "padding-box", "content-box" > ], >- "direction": [ >- "ltr", "rtl" >- ], > "enable-background": [ > "accumulate", "new" > ], >- "float": [ >- "none", "left", "right" >- ], > "hanging-punctuation": [ > "none", "first", "last", "allow-end", "force-end" > ], >- "overflow-x": [ >- "hidden", "auto", "visible", "overlay", "scroll", "marquee" >- ], >- "overflow-y": [ >- "hidden", "auto", "visible", "overlay", "scroll", "marquee", "-webkit-paged-x", "-webkit-paged-y" >- ], > "overflow": [ > "hidden", "auto", "visible", "overlay", "scroll", "marquee", "-webkit-paged-x", "-webkit-paged-y" > ], >- "margin-bottom-collapse": [ >- "collapse", "separate", "discard" >- ], > "-webkit-box-reflect": [ > "none", "left", "right", "above", "below" > ], >- "text-rendering": [ >- "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision" >- ], >- "text-align": [ >- "-webkit-auto", "left", "right", "center", "justify", "-webkit-left", "-webkit-right", "-webkit-center", "-webkit-match-parent", "start", "end" >- ], >- "list-style-position": [ >- "outside", "inside" >- ], > "margin-bottom": [ > "auto" > ], > "color-interpolation": [ > "linearrgb" > ], >- "word-wrap": [ >- "normal", "break-word" >- ], > "font-weight": [ > "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900" > ], > "font-synthesis": [ > "none", "weight", "style" > ], >- "margin-before-collapse": [ >- "collapse", "separate", "discard" >- ], >- "text-overline-width": [ >- "normal", "medium", "auto", "thick", "thin", "calc()" >- ], >- "text-transform": [ >- "none", "capitalize", "uppercase", "lowercase" >- ], >- "border-right-style": [ >- "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double" >- ], >- "border-left-style": [ >- "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double" >- ], > "font-style": [ > "italic", "oblique", "normal" > ], >- "speak": [ >- "none", "normal", "spell-out", "digits", "literal-punctuation", "no-punctuation" >- ], >- "text-line-through": [ >- "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave", "continuous", "skip-white-space" >- ], >- "color-rendering": [ >- "auto", "optimizeSpeed", "optimizeQuality" >- ], >- "list-style-type": [ >- "none", "disc", "circle", "square", "decimal", "decimal-leading-zero", "arabic-indic", "binary", "bengali", >- "cambodian", "khmer", "devanagari", "gujarati", "gurmukhi", "kannada", "lower-hexadecimal", "lao", "malayalam", >- "mongolian", "myanmar", "octal", "oriya", "persian", "urdu", "telugu", "tibetan", "thai", "upper-hexadecimal", >- "lower-roman", "upper-roman", "lower-greek", "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", "afar", >- "ethiopic-halehame-aa-et", "ethiopic-halehame-aa-er", "amharic", "ethiopic-halehame-am-et", "amharic-abegede", >- "ethiopic-abegede-am-et", "cjk-earthly-branch", "cjk-heavenly-stem", "ethiopic", "ethiopic-halehame-gez", >- "ethiopic-abegede", "ethiopic-abegede-gez", "hangul-consonant", "hangul", "lower-norwegian", "oromo", >- "ethiopic-halehame-om-et", "sidama", "ethiopic-halehame-sid-et", "somali", "ethiopic-halehame-so-et", "tigre", >- "ethiopic-halehame-tig", "tigrinya-er", "ethiopic-halehame-ti-er", "tigrinya-er-abegede", >- "ethiopic-abegede-ti-er", "tigrinya-et", "ethiopic-halehame-ti-et", "tigrinya-et-abegede", >- "ethiopic-abegede-ti-et", "upper-greek", "upper-norwegian", "asterisks", "footnotes", "hebrew", "armenian", >- "lower-armenian", "upper-armenian", "georgian", "cjk-ideographic", "hiragana", "katakana", "hiragana-iroha", >- "katakana-iroha" >- ], >- "-webkit-text-combine": [ >- "none", "horizontal" >- ], > "outline": [ > "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double" > ], >@@ -415,32 +261,9 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-apple-system-short-subheadline", "-apple-system-short-footnote", "-apple-system-short-caption1", > "-apple-system-tall-body", "-apple-system-title0", "-apple-system-title1", "-apple-system-title2", "-apple-system-title3", "-apple-system-title4", "system-ui" > ], >- "dominant-baseline": [ >- "middle", "auto", "central", "text-before-edge", "text-after-edge", "ideographic", "alphabetic", "hanging", >- "mathematical", "use-script", "no-change", "reset-size" >- ], >- "display": [ >- "none", "inline", "block", "list-item", "compact", "inline-block", "table", "inline-table", >- "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", >- "table-column", "table-cell", "table-caption", "-webkit-box", "-webkit-inline-box", "-wap-marquee", >- "flex", "inline-flex", "grid", "inline-grid" >- ], >- "image-rendering": [ >- "auto", "optimizeSpeed", "optimizeQuality", "-webkit-crisp-edges", "-webkit-optimize-contrast", "crisp-edges", "pixelated" >- ], >- "alignment-baseline": [ >- "baseline", "middle", "auto", "before-edge", "after-edge", "central", "text-before-edge", "text-after-edge", >- "ideographic", "alphabetic", "hanging", "mathematical" >- ], > "outline-width": [ > "medium", "thick", "thin", "calc()" > ], >- "text-line-through-width": [ >- "normal", "medium", "auto", "thick", "thin" >- ], >- "box-align": [ >- "baseline", "center", "stretch", "start", "end" >- ], > "box-shadow": [ > "none" > ], >@@ -453,9 +276,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "border-right-width": [ > "medium", "thick", "thin" > ], >- "border-top-style": [ >- "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double" >- ], > "line-height": [ > "normal" > ], >@@ -465,24 +285,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "counter-reset": [ > "none" > ], >- "text-overflow": [ >- "clip", "ellipsis" >- ], >- "-webkit-box-direction": [ >- "normal", "reverse" >- ], >- "margin-after-collapse": [ >- "collapse", "separate", "discard" >- ], >- "break-after": [ >- "left", "right", "recto", "verso", "auto", "avoid", "page", "column", "region", "avoid-page", "avoid-column", "avoid-region" >- ], >- "break-before": [ >- "left", "right", "recto", "verso", "auto", "avoid", "page", "column", "region", "avoid-page", "avoid-column", "avoid-region" >- ], >- "break-inside": [ >- "auto", "avoid", "avoid-page", "avoid-column", "avoid-region" >- ], > "page-break-after": [ > "left", "right", "auto", "always", "avoid" > ], >@@ -501,9 +303,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-column-break-inside": [ > "auto", "avoid" > ], >- "-webkit-hyphens": [ >- "none", "auto", "manual" >- ], > "border-image": [ > "repeat", "stretch", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "image-set()" > ], >@@ -513,9 +312,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-mask-box-image-repeat": [ > "repeat", "stretch", "space", "round" > ], >- "position": [ >- "absolute", "fixed", "relative", "static", "-webkit-sticky" >- ], > "font-family": [ > "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body", "-webkit-pictograph", > "-apple-system", "-apple-system-headline", "-apple-system-body", >@@ -524,18 +320,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-apple-system-short-footnote", "-apple-system-short-caption1", "-apple-system-tall-body", > "-apple-system-title0", "-apple-system-title1", "-apple-system-title2", "-apple-system-title3", "-apple-system-title4", "system-ui" > ], >- "text-overflow-mode": [ >- "clip", "ellipsis" >- ], >- "border-bottom-style": [ >- "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double" >- ], >- "unicode-bidi": [ >- "normal", "bidi-override", "embed", "plaintext", "isolate", "isolate-override" >- ], >- "clip-rule": [ >- "nonzero", "evenodd" >- ], > "margin-left": [ > "auto" > ], >@@ -566,29 +350,8 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "min-height": [ > "intrinsic", "min-intrinsic", "calc()" > ], >- "-webkit-logical-width": [ >- "intrinsic", "min-intrinsic", "-webkit-min-content", "-webkit-max-content", "-webkit-fill-available", "-webkit-fit-content", "calc()" >- ], >- "-webkit-logical-height": [ >- "intrinsic", "min-intrinsic", "calc()" >- ], >- "-webkit-max-logical-width": [ >- "none", "intrinsic", "min-intrinsic", "-webkit-min-content", "-webkit-max-content", "-webkit-fill-available", "-webkit-fit-content", "calc()" >- ], >- "-webkit-min-logical-width": [ >- "intrinsic", "min-intrinsic", "-webkit-min-content", "-webkit-max-content", "-webkit-fill-available", "-webkit-fit-content", "calc()" >- ], >- "-webkit-max-logical-height": [ >- "none", "intrinsic", "min-intrinsic", "calc()" >- ], >- "-webkit-min-logical-height": [ >- "intrinsic", "min-intrinsic", "calc()" >- ], >- "empty-cells": [ >- "hide", "show" >- ], > "pointer-events": [ >- "none", "all", "auto", "visible", "visiblepainted", "visiblefill", "visiblestroke", "painted", "fill", "stroke" >+ "visiblepainted", "visiblefill", "visiblestroke" > ], > "letter-spacing": [ > "normal", "calc()" >@@ -596,12 +359,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "word-spacing": [ > "normal", "calc()" > ], >- "-webkit-font-kerning": [ >- "auto", "normal", "none" >- ], >- "-webkit-font-smoothing": [ >- "none", "auto", "antialiased", "subpixel-antialiased" >- ], > "border": [ > "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double" > ], >@@ -618,21 +375,9 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "vertical-align": [ > "baseline", "middle", "sub", "super", "text-top", "text-bottom", "top", "bottom", "-webkit-baseline-middle" > ], >- "white-space": [ >- "normal", "nowrap", "pre", "pre-line", "pre-wrap" >- ], >- "word-break": [ >- "normal", "break-all", "break-word" >- ], >- "text-underline-width": [ >- "normal", "medium", "auto", "thick", "thin", "calc()" >- ], > "text-indent": [ > "-webkit-each-line", "-webkit-hanging" > ], >- "-webkit-box-lines": [ >- "single", "multiple" >- ], > "clip": [ > "auto", "rect()" > ], >@@ -663,12 +408,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-marquee-increment": [ > "small", "large", "medium" > ], >- "-webkit-marquee-direction": [ >- "left", "right", "auto", "reverse", "forwards", "backwards", "ahead", "up", "down" >- ], >- "-webkit-marquee-style": [ >- "none", "scroll", "slide", "alternate" >- ], > "-webkit-marquee-repetition": [ > "infinite" > ], >@@ -678,9 +417,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "margin-right": [ > "auto" > ], >- "marquee-speed": [ >- "normal", "slow", "fast" >- ], > "-webkit-text-emphasis": [ > "circle", "filled", "open", "dot", "double-circle", "triangle", "sesame" > ], >@@ -695,12 +431,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "scale()", "scaleX()", "scaleY()", "scale3d()", "rotate()", "rotateX()", "rotateY()", "rotateZ()", "rotate3d()", "skew()", "skewX()", "skewY()", > "translate()", "translateX()", "translateY()", "translateZ()", "translate3d()", "matrix()", "matrix3d()", "perspective()" > ], >- "transform-style": [ >- "flat", "preserve-3d" >- ], >- "-webkit-cursor-visibility": [ >- "auto", "auto-hide" >- ], > "text-decoration": [ > "none", "underline", "overline", "line-through", "blink" > ], >@@ -710,35 +440,12 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-text-decoration-line": [ > "none", "underline", "overline", "line-through", "blink" > ], >- "-webkit-text-decoration-style": [ >- "solid", "double", "dotted", "dashed", "wavy" >- ], > "-webkit-text-decoration-skip": [ > "auto", "none", "objects", "ink" > ], > "-webkit-text-underline-position": [ > "auto", "alphabetic", "under" > ], >- "image-resolution": [ >- "from-image", "snap" >- ], >- "-webkit-blend-mode": [ >- "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "plus-darker", "plus-lighter", "hue", "saturation", "color", "luminosity", >- ], >- "mix-blend-mode": [ >- "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "plus-darker", "plus-lighter", "hue", "saturation", "color", "luminosity", >- ], >- "mix": [ >- "auto", >- "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "plus-darker", "plus-lighter", "hue", "saturation", "color", "luminosity", >- "clear", "copy", "destination", "source-over", "destination-over", "source-in", "destination-in", "source-out", "destination-out", "source-atop", "destination-atop", "xor" >- ], >- "geometry": [ >- "detached", "attached", "grid()" >- ], >- "overflow-wrap": [ >- "normal", "break-word" >- ], > "transition": [ > "none", "ease", "linear", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end", "steps()", "cubic-bezier()", "spring()", "all", WI.CSSKeywordCompletions.AllPropertyNamesPlaceholder > ], >@@ -748,12 +455,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "transition-property": [ > "all", "none", WI.CSSKeywordCompletions.AllPropertyNamesPlaceholder > ], >- "-webkit-column-progression": [ >- "normal", "reverse" >- ], >- "-webkit-box-decoration-break": [ >- "slice", "clone" >- ], > "align-content": [ > "auto", > "baseline", "last-baseline", >@@ -791,12 +492,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "center", "start", "end", "self-start", "self-end", "flex-start", "flex-end", "left", "right", > "true", "safe" > ], >- "flex-direction": [ >- "row", "row-reverse", "column", "column-reverse" >- ], >- "flex-wrap": [ >- "nowrap", "wrap", "wrap-reverse" >- ], > "flex-flow": [ > "row", "row-reverse", "column", "column-reverse", > "nowrap", "wrap", "wrap-reverse" >@@ -852,138 +547,21 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "grid-template-rows": [ > "none", "auto", "-webkit-max-content", "-webkit-min-content", "minmax()", "repeat()" > ], >- "-webkit-ruby-position": [ >- "after", "before", "inter-character" >- ], >- "-webkit-text-align-last": [ >- "auto", "start", "end", "left", "right", "center", "justify" >- ], >- "-webkit-text-justify": [ >- "auto", "none", "inter-word", "inter-ideograph", "inter-cluster", "distribute", "kashida" >- ], >- "max-zoom": [ >- "auto" >- ], >- "min-zoom": [ >- "auto" >- ], >- "orientation": [ >- "auto", "portait", "landscape" >- ], > "scroll-snap-align": [ > "none", "start", "center", "end" > ], > "scroll-snap-type": [ > "none", "mandatory", "proximity", "x", "y", "inline", "block", "both" > ], >- "user-zoom": [ >- "zoom", "fixed" >- ], >- "-webkit-app-region": [ >- "drag", "no-drag" >- ], >- "-webkit-line-break": [ >- "auto", "loose", "normal", "strict", "after-white-space" >- ], > "-webkit-background-composite": [ > "clear", "copy", "source-over", "source-in", "source-out", "source-atop", "destination-over", "destination-in", "destination-out", "destination-atop", "xor", "plus-darker", "plus-lighter" > ], > "-webkit-mask-composite": [ > "clear", "copy", "source-over", "source-in", "source-out", "source-atop", "destination-over", "destination-in", "destination-out", "destination-atop", "xor", "plus-darker", "plus-lighter" > ], >- "-webkit-animation-direction": [ >- "normal", "alternate", "reverse", "alternate-reverse" >- ], >- "-webkit-animation-fill-mode": [ >- "none", "forwards", "backwards", "both" >- ], >- "-webkit-animation-iteration-count": [ >- "infinite" >- ], >- "-webkit-animation-play-state": [ >- "paused", "running" >- ], >- "-webkit-animation-timing-function": [ >- "ease", "linear", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end", "steps()", "cubic-bezier()", "spring()" >- ], >- "-webkit-column-span": [ >- "all", "none", "calc()" >- ], >- "-webkit-region-break-after": [ >- "auto", "always", "avoid", "left", "right" >- ], >- "-webkit-region-break-before": [ >- "auto", "always", "avoid", "left", "right" >- ], >- "-webkit-region-break-inside": [ >- "auto", "avoid" >- ], >- "-webkit-region-overflow": [ >- "auto", "break" >- ], >- "-webkit-backface-visibility": [ >- "visible", "hidden" >- ], >- "resize": [ >- "none", "both", "horizontal", "vertical", "auto" >- ], >- "caption-side": [ >- "top", "bottom", "left", "right" >- ], >- "box-sizing": [ >- "border-box", "content-box" >- ], >- "-webkit-alt": [ >- "attr()" >- ], >- "-webkit-border-fit": [ >- "border", "lines" >- ], >- "-webkit-line-align": [ >- "none", "edges" >- ], >- "-webkit-line-snap": [ >- "none", "baseline", "contain" >- ], >- "-webkit-nbsp-mode": [ >- "normal", "space" >- ], >- "-webkit-print-color-adjust": [ >- "exact", "economy" >- ], >- "-webkit-rtl-ordering": [ >- "logical", "visual" >- ], >- "-webkit-text-security": [ >- "disc", "circle", "square", "none" >- ], >- "-webkit-user-drag": [ >- "auto", "none", "element" >- ], >- "-webkit-user-modify": [ >- "read-only", "read-write", "read-write-plaintext-only" >- ], >- "-webkit-user-select": [ >- "auto", "none", "text", "all" >- ], > "-webkit-text-stroke-width": [ > "medium", "thick", "thin", "calc()" > ], >- "-webkit-border-start-width": [ >- "medium", "thick", "thin", "calc()" >- ], >- "-webkit-border-end-width": [ >- "medium", "thick", "thin", "calc()" >- ], >- "-webkit-border-before-width": [ >- "medium", "thick", "thin", "calc()" >- ], >- "-webkit-border-after-width": [ >- "medium", "thick", "thin", "calc()" >- ], >- "-webkit-column-rule-width": [ >- "medium", "thick", "thin", "calc()" >- ], > "-webkit-aspect-ratio": [ > "auto", "from-dimensions", "from-intrinsic", "/" > ], >@@ -993,21 +571,6 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-backdrop-filter": [ > "none", "grayscale()", "sepia()", "saturate()", "hue-rotate()", "invert()", "opacity()", "brightness()", "contrast()", "blur()", "drop-shadow()", "custom()" > ], >- "-webkit-column-count": [ >- "auto", "calc()" >- ], >- "-webkit-column-gap": [ >- "normal", "calc()" >- ], >- "-webkit-column-axis": [ >- "horizontal", "vertical", "auto" >- ], >- "-webkit-column-width": [ >- "auto", "calc()" >- ], >- "-webkit-column-fill": [ >- "auto", "balance" >- ], > "-webkit-hyphenate-character": [ > "none" > ], >@@ -1026,23 +589,12 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-locale": [ > "auto" > ], >- "-webkit-text-orientation": [ >- "sideways", "sideways-right", "vertical-right", "upright" >- ], > "-webkit-line-box-contain": [ > "block", "inline", "font", "glyphs", "replaced", "inline-box", "none" > ], > "font-feature-settings": [ > "normal" > ], >- "-webkit-font-variant-ligatures": [ >- "normal", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", "historical-ligatures", "no-historical-ligatures" >- ], >- /* >- "-webkit-appearance": [ >- "none", "checkbox", "radio", "push-button", "square-button", "button", "button-bevel", "default-button", "inner-spin-button", "listbox", "listitem", "media-enter-fullscreen-button", "media-exit-fullscreen-button", "media-fullscreen-volume-slider", "media-fullscreen-volume-slider-thumb", "media-mute-button", "media-play-button", "media-overlay-play-button", "media-seek-back-button", "media-seek-forward-button", "media-rewind-button", "media-return-to-realtime-button", "media-toggle-closed-captions-button", "media-slider", "media-sliderthumb", "media-volume-slider-container", "media-volume-slider", "media-volume-sliderthumb", "media-volume-slider-mute-button", "media-controls-background", "media-controls-fullscreen-background", "media-current-time-display", "media-time-remaining-display", "menulist", "menulist-button", "menulist-text", "menulist-textfield", "meter", "progress-bar", "progress-bar-value", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "caret", "searchfield", "searchfield-decoration", "searchfield-results-decoration", "searchfield-results-button", "searchfield-cancel-button", "snapshotted-plugin-overlay", "textfield", "relevancy-level-indicator", "continuous-capacity-level-indicator", "discrete-capacity-level-indicator", "rating-level-indicator", "textarea", "attachment", "caps-lock-indicator", "color-well", "list-button" >- ], >- */ > "-webkit-animation-trigger": [ > "auto", "container-scroll()" > ], >@@ -1051,18 +603,4 @@ WI.CSSKeywordCompletions._propertyKeywordMap = { > "-webkit-text-size-adjust": [ > "none", "auto" > ], >- "-webkit-touch-callout": [ >- "default", "none" >- ], >- "-webkit-overflow-scrolling": [ >- "auto", "touch" >- ], >- >- // Apple Pay Properties >- "-apple-pay-button-style": [ >- "black", "white", "white-outline" >- ], >- "-apple-pay-button-type": [ >- "book", "buy", "checkout", "donate", "in-store", "plain", "set-up", "subscribe" >- ] > }; >diff --git a/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js b/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js >index 2a6d64f68f3b067131c8782d5df7f3d16fe61fbd..98025a86c211d56023cd1b4ad43e774995f4ec86 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js >+++ b/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js >@@ -40,7 +40,7 @@ WI.CSSProperty = class CSSProperty extends WI.Object > static isInheritedPropertyName(name) > { > console.assert(typeof name === "string"); >- if (name in WI.CSSKeywordCompletions.InheritedProperties) >+ if (WI.CSSKeywordCompletions.InheritedProperties.has(name)) > return true; > // Check if the name is a CSS variable. > return name.startsWith("--"); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e4f151a931261dbcebaac3318fc9a89626c05033..bcf0cfe0f874163184a07f8c50e8380649141581 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-28 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: generate CSSKeywordCompletions from backend values >+ https://bugs.webkit.org/show_bug.cgi?id=189041 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/css/getSupportedCSSProperties-expected.txt: >+ * inspector/css/getSupportedCSSProperties.html: >+ > 2018-08-27 Mark Lam <mark.lam@apple.com> > > Fix exception throwing code so that topCallFrame and topEntryFrame stay true to their names. >diff --git a/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt b/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt >index af0b2cc9678b07d475fe6c7558593b5faa69a02a..498f59c878f6ebdbf34cc4ea6b7db720ae0547d7 100644 >--- a/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt >+++ b/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt >@@ -1,2 +1,7 @@ >-box-shadow is supported >+"display" is supported >+"display: block;" is supported >+"display" is NOT inherited >+"text-align" is supported >+"text-align: center;" is supported >+"text-align" is inherited > >diff --git a/LayoutTests/inspector/css/getSupportedCSSProperties.html b/LayoutTests/inspector/css/getSupportedCSSProperties.html >index cc2350ae2bb4ab99b3d63505fd540fd037e8f19b..90f25b823c3dc8bcad17b9d7fb78177cd3e82f13 100644 >--- a/LayoutTests/inspector/css/getSupportedCSSProperties.html >+++ b/LayoutTests/inspector/css/getSupportedCSSProperties.html >@@ -4,22 +4,50 @@ > <script> > function test() > { >- InspectorProtocol.sendCommand("CSS.getSupportedCSSProperties", {}, function(messageObject) { >+ InspectorProtocol.sendCommand("CSS.getSupportedCSSProperties", {}, (messageObject) => { > if ("error" in messageObject) > ProtocolTest.log(messageObject.error.message); > else { >- var cssProperty = "box-shadow"; >- var entries = messageObject["result"]["cssProperties"]; >+ let entries = messageObject["result"]["cssProperties"]; >+ >+ const expectedProperties = [ >+ { >+ name: "display", >+ value: "block", >+ }, >+ { >+ name: "text-align", >+ value: "center", >+ }, >+ ]; >+ >+ for (let expectedProperty of expectedProperties) { >+ for (var i = 0; i < entries.length; ++i) { >+ let entry = entries[i]; >+ >+ if (entry.name !== expectedProperty.name) >+ continue; >+ >+ ProtocolTest.log(`"${expectedProperty.name}" is supported`); >+ >+ if (!entry.values) >+ ProtocolTest.log(`"${expectedProperty.name}" has NO values`); >+ else if (entry.values.includes(expectedProperty.value)) >+ ProtocolTest.log(`"${expectedProperty.name}: ${expectedProperty.value};" is supported`); >+ else >+ ProtocolTest.log(`"${expectedProperty.name}: ${expectedProperty.value};" is NOT supported`); >+ >+ if (entry.inherited) >+ ProtocolTest.log(`"${expectedProperty.name}" is inherited`); >+ else >+ ProtocolTest.log(`"${expectedProperty.name}" is NOT inherited`); > >- for (var i = 0; i < entries.length; ++i) { >- if (entries[i].name === cssProperty) { >- ProtocolTest.log(entries[i].name + " is supported"); > break; > } >- } > >- if (i === entries.length) >- ProtocolTest.log(cssProperty + " is NOT supported"); >+ if (i === entries.length) >+ ProtocolTest.log(expectedProperty + " is NOT supported"); >+ } > } > > ProtocolTest.completeTest();
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 Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189041
:
348267
|
348268
|
348270
|
348280
|
348305
|
348609
|
349764
|
349937