Changeset 236273 in webkit
- Timestamp:
- Sep 20, 2018 11:57:56 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r236272 r236273 1 2018-09-20 Justin Michaud <justin_michaud@apple.com> 2 3 Implement CSS Custom Properties and Values Skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=189694 5 6 Reviewed by Simon Fraser. 7 8 Add test to check that the CSS.registerProperty method exists. 9 10 * css-custom-properties-api/registerProperty-expected.txt: Added. 11 * css-custom-properties-api/registerProperty.html: Added. 12 * platform/ios-wk1/TestExpectations: 13 * platform/mac-wk1/TestExpectations: 14 1 15 2018-09-20 Dawei Fenton <realdawei@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-wk1/TestExpectations
r235985 r236273 1974 1974 1975 1975 webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html [ Pass Failure ] 1976 1977 # Not supported on WK1 1978 css-custom-properties-api [ Skip ] -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r236162 r236273 620 620 621 621 webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ] 622 623 # Not supported on WK1 624 css-custom-properties-api [ Skip ] -
trunk/Source/WebCore/CMakeLists.txt
r236147 r236273 526 526 css/CSSSupportsRule.idl 527 527 css/CSSUnknownRule.idl 528 css/DOMCSSCustomPropertyDescriptor.idl 529 css/DOMCSSNamespace.idl 530 css/DOMCSSRegisterCustomProperty.idl 528 531 css/DOMMatrix.idl 529 532 css/DOMMatrix2DInit.idl … … 536 539 css/DeprecatedCSSOMValue.idl 537 540 css/DeprecatedCSSOMValueList.idl 538 css/DOMCSSNamespace.idl539 541 css/ElementCSSInlineStyle.idl 540 542 css/FontFace.idl -
trunk/Source/WebCore/ChangeLog
r236266 r236273 1 2018-09-20 Justin Michaud <justin_michaud@apple.com> 2 3 Implement CSS Custom Properties and Values Skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=189694 5 6 Reviewed by Simon Fraser. 7 8 Add feature flag, CSS.registerProperty binding and registered property set in Document.h 9 for the css custom properties and values api. 10 11 Test: css-properties-values-api/registerProperty.html 12 13 * CMakeLists.txt: 14 * DerivedSources.make: 15 * Sources.txt: 16 * WebCore.xcodeproj/project.pbxproj: 17 * css/CSSRegisteredCustomProperty.h: Added. 18 * css/DOMCSSCustomPropertyDescriptor.h: Added. 19 * css/DOMCSSCustomPropertyDescriptor.idl: Added. 20 * css/DOMCSSNamespace.h: 21 * css/DOMCSSRegisterCustomProperty.cpp: Added. 22 (WebCore::DOMCSSRegisterCustomProperty::registerProperty): 23 (WebCore::DOMCSSRegisterCustomProperty::from): 24 (WebCore::DOMCSSRegisterCustomProperty::supplementName): 25 * css/DOMCSSRegisterCustomProperty.h: Added. 26 * css/DOMCSSRegisterCustomProperty.idl: Added. 27 * css/parser/CSSParserContext.cpp: 28 * dom/Document.cpp: 29 (WebCore::Document::registerCSSProperty): 30 * dom/Document.h: 31 * features.json: 32 * page/RuntimeEnabledFeatures.h: 33 (WebCore::RuntimeEnabledFeatures::setCSSCustomPropertiesAndValuesEnabled): 34 (WebCore::RuntimeEnabledFeatures::cssCustomPropertiesAndValuesEnabled const): 35 1 36 2018-09-20 Justin Michaud <justin_michaud@apple.com> 2 37 -
trunk/Source/WebCore/DerivedSources.make
r236147 r236273 452 452 $(WebCore)/css/DeprecatedCSSOMValue.idl \ 453 453 $(WebCore)/css/DeprecatedCSSOMValueList.idl \ 454 $(WebCore)/css/DOMCSSCustomPropertyDescriptor.idl \ 454 455 $(WebCore)/css/DOMCSSNamespace.idl \ 456 $(WebCore)/css/DOMCSSRegisterCustomProperty.idl \ 455 457 $(WebCore)/css/ElementCSSInlineStyle.idl \ 456 458 $(WebCore)/css/FontFace.idl \ -
trunk/Source/WebCore/Sources.txt
r236147 r236273 621 621 css/CSSVariableReferenceValue.cpp 622 622 css/DOMCSSNamespace.cpp 623 css/DOMCSSRegisterCustomProperty.cpp 623 624 css/DOMMatrix.cpp 624 625 css/DOMMatrixReadOnly.cpp … … 2514 2515 JSDOMApplicationCache.cpp 2515 2516 JSDOMCSSNamespace.cpp 2517 JSDOMCSSRegisterCustomProperty.cpp 2518 JSDOMCSSCustomPropertyDescriptor.cpp 2516 2519 JSDOMCache.cpp 2517 2520 JSDOMCacheStorage.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r236147 r236273 1345 1345 4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6FA6F20C39E48C00087011 /* SmartReplace.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1346 1346 4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1347 4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */; }; 1348 4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */; }; 1349 4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1347 1350 4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1348 1351 4E19592A0A39DACC00220FE5 /* MediaQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959240A39DACC00220FE5 /* MediaQuery.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 7841 7844 4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmartReplaceCF.cpp; sourceTree = "<group>"; }; 7842 7845 4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorDeleteAction.h; sourceTree = "<group>"; }; 7846 4BDA3FF52151B6F000FD6604 /* DOMCSSRegisterCustomProperty.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSRegisterCustomProperty.idl; sourceTree = "<group>"; }; 7847 4BDA3FF72151B6F100FD6604 /* DOMCSSRegisterCustomProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCSSRegisterCustomProperty.cpp; sourceTree = "<group>"; }; 7848 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSCustomPropertyDescriptor.h; sourceTree = "<group>"; }; 7849 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSRegisterCustomProperty.h; sourceTree = "<group>"; }; 7850 4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSCustomPropertyDescriptor.idl; sourceTree = "<group>"; }; 7851 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSRegisteredCustomProperty.h; sourceTree = "<group>"; }; 7843 7852 4E19591F0A39DABA00220FE5 /* MediaFeatureNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaFeatureNames.cpp; sourceTree = "<group>"; }; 7844 7853 4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaFeatureNames.h; sourceTree = "<group>"; }; … … 23952 23961 2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */, 23953 23962 AD9FF6E01908391D003B61E0 /* IOSurfacePoolCocoa.mm */, 23963 CDC48AC82149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.cpp */, 23954 23964 CDC48AC72149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h */, 23955 CDC48AC82149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.cpp */,23956 23965 526724F21CB2FDF60075974D /* TextTrackRepresentationCocoa.h */, 23957 23966 526724F11CB2FDF60075974D /* TextTrackRepresentationCocoa.mm */, … … 24731 24740 isa = PBXGroup; 24732 24741 children = ( 24742 417F7AED2139BF6500FBA7EC /* MediaSessionManagerCocoa.h */, 24733 24743 417F7AEA2139BF6400FBA7EC /* MediaSessionManagerCocoa.mm */, 24734 417F7AED2139BF6500FBA7EC /* MediaSessionManagerCocoa.h */,24735 24744 417F7AEB2139BF6400FBA7EC /* WebAudioBufferList.cpp */, 24736 24745 417F7AEC2139BF6500FBA7EC /* WebAudioBufferList.h */, … … 25678 25687 BC5A12DD0DC0414800C9AFAD /* CSSReflectValue.cpp */, 25679 25688 BC5A12DE0DC0414800C9AFAD /* CSSReflectValue.h */, 25689 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */, 25680 25690 BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */, 25681 25691 BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */, … … 25747 25757 4A4F48A716B0DFC000EDBB29 /* DocumentRuleSets.cpp */, 25748 25758 4A4F48A816B0DFC000EDBB29 /* DocumentRuleSets.h */, 25759 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */, 25760 4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */, 25749 25761 FD677735195CAB200072E0D3 /* DOMCSSNamespace.cpp */, 25750 25762 FC9A0F72164094CF003D6B8D /* DOMCSSNamespace.h */, 25751 25763 FC9A0F73164094CF003D6B8D /* DOMCSSNamespace.idl */, 25764 4BDA3FF72151B6F100FD6604 /* DOMCSSRegisterCustomProperty.cpp */, 25765 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */, 25766 4BDA3FF52151B6F000FD6604 /* DOMCSSRegisterCustomProperty.idl */, 25752 25767 836ACEC41ECA6654004BD012 /* DOMMatrix.cpp */, 25753 25768 836ACEC51ECA6654004BD012 /* DOMMatrix.h */, … … 27672 27687 9362640B0DE1137D009D5A00 /* CSSReflectionDirection.h in Headers */, 27673 27688 BC5A12E00DC0414800C9AFAD /* CSSReflectValue.h in Headers */, 27689 4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */, 27674 27690 BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */, 27675 27691 A80E6D0D0A1989CA007FB8C5 /* CSSRule.h in Headers */, … … 27831 27847 41FABD2D1F4DFE4A006A6C97 /* DOMCacheEngine.h in Headers */, 27832 27848 41380C291F3436AC00155FDA /* DOMCacheStorage.h in Headers */, 27849 4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */, 27833 27850 FC9A0F75164094CF003D6B8D /* DOMCSSNamespace.h in Headers */, 27851 4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */, 27834 27852 7AABA25A14BC613300AA9A11 /* DOMEditor.h in Headers */, 27835 27853 BC60D6E90D28D83400B9918F /* DOMException.h in Headers */, … … 29473 29491 2D9BF7081DBFBB24007A7D99 /* MediaEncryptedEventInit.h in Headers */, 29474 29492 41B28B151F8501D300FB52AC /* MediaEndpointConfiguration.h in Headers */, 29493 CDC48AC92149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h in Headers */, 29475 29494 E44613AD0CD6331000FADA75 /* MediaError.h in Headers */, 29476 29495 4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */, … … 30287 30306 517A53291F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.h in Headers */, 30288 30307 51F175691F3EBC8300C74950 /* ServiceWorkerRegistrationOptions.h in Headers */, 30289 CDC48AC92149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h in Headers */,30290 30308 51BCCE301F8F179E006BA0ED /* ServiceWorkerThread.h in Headers */, 30291 30309 4112B5431F9F9CA000E67875 /* ServiceWorkerThreadProxy.h in Headers */, -
trunk/Source/WebCore/css/DOMCSSNamespace.h
r208321 r236273 30 30 #pragma once 31 31 32 #include "Supplementable.h" 33 32 34 #include <wtf/Forward.h> 33 35 #include <wtf/RefCounted.h> … … 37 39 class Document; 38 40 39 class DOMCSSNamespace final : public RefCounted<DOMCSSNamespace> {41 class DOMCSSNamespace final : public RefCounted<DOMCSSNamespace>, public Supplementable<DOMCSSNamespace> { 40 42 public: 41 43 static bool supports(Document&, const String& property, const String& value); -
trunk/Source/WebCore/css/parser/CSSParserContext.cpp
r234215 r236273 27 27 #include "CSSParserContext.h" 28 28 29 #include "Document.h" 30 #include "Page.h" 31 #include "Settings.h" 29 32 #include <wtf/NeverDestroyed.h> 30 33 -
trunk/Source/WebCore/dom/Document.cpp
r235943 r236273 8217 8217 } 8218 8218 8219 bool Document::registerCSSProperty(CSSRegisteredCustomProperty&& prop) 8220 { 8221 return m_CSSRegisteredPropertySet.add(prop.name, std::make_unique<CSSRegisteredCustomProperty>(WTFMove(prop))).isNewEntry; 8222 } 8223 8219 8224 } // namespace WebCore -
trunk/Source/WebCore/dom/Document.h
r235830 r236273 28 28 #pragma once 29 29 30 #include "CSSRegisteredCustomProperty.h" 30 31 #include "Color.h" 31 32 #include "ContainerNode.h" … … 1492 1493 bool hasMainArticleElement() const { return !!m_mainArticleElement; } 1493 1494 1495 bool registerCSSProperty(CSSRegisteredCustomProperty&&); 1496 1494 1497 void setAsRunningUserScripts() { m_isRunningUserScripts = true; } 1495 1498 bool isRunningUserScripts() const { return m_isRunningUserScripts; } … … 2024 2027 std::unique_ptr<UserGestureIndicator> m_temporaryUserGesture; 2025 2028 2029 HashMap<String, std::unique_ptr<CSSRegisteredCustomProperty>> m_CSSRegisteredPropertySet; 2030 2026 2031 bool m_isRunningUserScripts { false }; 2027 2032 }; -
trunk/Source/WebCore/features.json
r235489 r236273 49 49 "category": "css", 50 50 "description": "Allows content to specify colors outside of the sRGB Color Space." 51 }, 52 { 53 "name": "CSS Custom Properties And Values", 54 "status": { 55 "status": "Under Development" 56 }, 57 "url": "https://drafts.css-houdini.org/css-properties-values-api/", 58 "webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=189692", 59 "keywords": ["CSSCustomPropertiesAndValues", "custom properties", "css"], 60 "description": "An API for registering new CSS properties. Properties registered using this API are provided with a parse syntax that defines a type, inheritance behaviour, and an initial value." 51 61 }, 52 62 { -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r235683 r236273 286 286 bool webAPIStatisticsEnabled() const { return m_webAPIStatisticsEnabled; } 287 287 288 void setCSSCustomPropertiesAndValuesEnabled(bool isEnabled) { m_CSSCustomPropertiesAndValuesEnabled = isEnabled; } 289 bool cssCustomPropertiesAndValuesEnabled() const { return m_CSSCustomPropertiesAndValuesEnabled; } 290 288 291 WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures(); 289 292 … … 431 434 bool m_webAPIStatisticsEnabled { false }; 432 435 436 bool m_CSSCustomPropertiesAndValuesEnabled { false }; 437 433 438 friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>; 434 439 }; -
trunk/Source/WebKit/ChangeLog
r236270 r236273 1 2018-09-20 Justin Michaud <justin_michaud@apple.com> 2 3 Implement CSS Custom Properties and Values Skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=189694 5 6 Reviewed by Simon Fraser. 7 8 Add feature flag for CSS custom properties and values api 9 10 * Shared/WebPreferences.yaml: 11 * WebProcess/InjectedBundle/InjectedBundle.cpp: 12 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 13 1 14 2018-09-19 Dean Jackson <dino@apple.com> 2 15 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r236270 r236273 1351 1351 webcoreBinding: RuntimeEnabledFeatures 1352 1352 category: internal 1353 1354 CSSCustomPropertiesAndValuesEnabled: 1355 type: bool 1356 defaultValue: false 1357 humanReadableName: "CSS Custom Properties and Values API" 1358 humanReadableDescription: "Enable CSS Custom Properties and Values API" 1359 webcoreBinding: RuntimeEnabledFeatures 1360 category: experimental -
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
r235683 r236273 254 254 RuntimeEnabledFeatures::sharedFeatures().setWebAPIStatisticsEnabled(enabled); 255 255 256 if (preference == "CSSCustomPropertiesAndValuesEnabled") 257 RuntimeEnabledFeatures::sharedFeatures().setCSSCustomPropertiesAndValuesEnabled(enabled); 258 256 259 // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore. 257 260 #define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
Note: See TracChangeset
for help on using the changeset viewer.