WebKit Bugzilla
Attachment 357574 Details for
Bug 192671
: CSS Typed OM should expose attributeStyleMap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192671-20181218100126.patch (text/plain), 68.47 KB, created by
Justin Michaud
on 2018-12-18 10:01:30 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Michaud
Created:
2018-12-18 10:01:30 PST
Size:
68.47 KB
patch
obsolete
>Subversion Revision: 239319 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6ff69a5dcced4968f02d3d4bbe01f91e5c902ac0..ac1c979e911fb6d98634ba287937bc55a0b70555 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,50 @@ >+2018-12-17 Justin Michaud <justin_michaud@apple.com> >+ >+ CSS Typed OM should expose attributeStyleMap >+ https://bugs.webkit.org/show_bug.cgi?id=192671 >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Exposes element.attributeStyleMap, adds a stub for the StylePropertyMap class, and updates the existing >+ TypedOMCSSImageValue to not require a RenderObject so that it can still work inside attributeStyleMap. >+ >+ Test: css-typedom/attributeStyleMap.html >+ >+ * CMakeLists.txt: >+ * DerivedSources.make: >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/WebCoreBuiltinNames.h: >+ * css/ElementCSSInlineStyle.idl: >+ * css/typedom/StylePropertyMap.h: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.h. >+ * css/typedom/StylePropertyMap.idl: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl. >+ * css/typedom/StylePropertyMapReadOnly.cpp: Added. >+ (WebCore::StylePropertyMapReadOnly::reifyValue): >+ (WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault): >+ * css/typedom/StylePropertyMapReadOnly.h: >+ (WebCore::StylePropertyMapReadOnly::create): Deleted. >+ (WebCore::StylePropertyMapReadOnly::get const): Deleted. >+ (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly): Deleted. >+ * css/typedom/StylePropertyMapReadOnly.idl: >+ * css/typedom/TypedOMCSSImageValue.h: >+ * dom/Element.cpp: >+ (WebCore::Element::attributeStyleMap): >+ (WebCore::Element::setAttributeStyleMap): >+ * dom/Element.h: >+ * dom/ElementRareData.cpp: >+ * dom/ElementRareData.h: >+ (WebCore::ElementRareData::attributeStyleMap): >+ (WebCore::ElementRareData::setAttributeStyleMap): >+ * dom/StyledElement.cpp: >+ (WebCore::StyledElement::ensureAttributeStyleMap): >+ * dom/StyledElement.h: >+ * html/canvas/CanvasRenderingContext2DBase.cpp: >+ (WebCore::size): >+ (WebCore::CanvasRenderingContext2DBase::drawImage): >+ * platform/graphics/CustomPaintImage.cpp: >+ (WebCore::extractComputedProperty): >+ (WebCore::CustomPaintImage::doCustomPaint): >+ > 2018-12-17 Eric Carlson <eric.carlson@apple.com> > > [MediaStream] A stream's first video frame should be rendered >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index df7da0f84546b441a7302587fb7dac4e7b4a6b6f..770d4e587ad6f363dae3349b33b62bd70771ff70 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -604,12 +604,13 @@ set(WebCore_NON_SVG_IDL_FILES > css/StyleSheet.idl > css/StyleSheetList.idl > >+ css/typedom/StylePropertyMap.idl >+ css/typedom/StylePropertyMapReadOnly.idl > css/typedom/TypedOMCSSImageValue.idl > css/typedom/TypedOMCSSNumericValue.idl > css/typedom/TypedOMCSSStyleValue.idl > css/typedom/TypedOMCSSUnitValue.idl > css/typedom/TypedOMCSSUnparsedValue.idl >- css/typedom/StylePropertyMapReadOnly.idl > > css/WebKitCSSMatrix.idl > css/WebKitCSSViewportRule.idl >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index 321bd439a5e085f22900ee7268e7da09bb2bed27..6b3ffa99b7ba6f3aa16a29997dbb9a6e45309be8 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -513,6 +513,7 @@ JS_BINDING_IDLS = \ > $(WebCore)/css/StyleMedia.idl \ > $(WebCore)/css/StyleSheet.idl \ > $(WebCore)/css/StyleSheetList.idl \ >+ $(WebCore)/css/typedom/StylePropertyMap.idl \ > $(WebCore)/css/typedom/StylePropertyMapReadOnly.idl \ > $(WebCore)/css/typedom/TypedOMCSSImageValue.idl \ > $(WebCore)/css/typedom/TypedOMCSSNumericValue.idl \ >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 7352f33e176dc9abb86f5884562c82f5b76c7bfa..93af74075bf38405932317ae68bbf015dbde1e5e 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -721,6 +721,8 @@ css/parser/MediaQueryParser.cpp > css/parser/SizesAttributeParser.cpp > css/parser/SizesCalcParser.cpp > >+css/typedom/StylePropertyMapReadOnly.cpp >+ > cssjit/SelectorCompiler.cpp > > dom/AbortController.cpp >@@ -3184,6 +3186,7 @@ JSStorage.cpp > JSStorageEvent.cpp > JSStringCallback.cpp > JSStyleMedia.cpp >+JSStylePropertyMap.cpp > JSStylePropertyMapReadOnly.cpp > JSStyleSheet.cpp > JSStyleSheetList.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index c924a495727b4de5bd289fc18ce7c821575239fa..ceaebbc1b9585290aa8e366d5d358ec52ba50915 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1382,6 +1382,7 @@ > 4BAFD0D921921EA000C0AB64 /* TypedOMCSSUnparsedValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAFD0D821921EA000C0AB64 /* TypedOMCSSUnparsedValue.h */; }; > 4BAFD0E0219220AB00C0AB64 /* TypedOMCSSNumericValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAFD0DF219220AB00C0AB64 /* TypedOMCSSNumericValue.h */; }; > 4BAFD0E1219242A000C0AB64 /* TypedOMCSSUnitValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAFD0DD2192209200C0AB64 /* TypedOMCSSUnitValue.h */; }; >+ 4BD781BF21C1965F00D9703E /* StylePropertyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD781BE21C1965F00D9703E /* StylePropertyMap.h */; }; > 4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */; }; > 4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */; }; > 4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -7919,6 +7920,9 @@ > 4BAFD0DD2192209200C0AB64 /* TypedOMCSSUnitValue.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; path = TypedOMCSSUnitValue.h; sourceTree = "<group>"; }; > 4BAFD0DF219220AB00C0AB64 /* TypedOMCSSNumericValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypedOMCSSNumericValue.h; sourceTree = "<group>"; }; > 4BAFD0E22192604D00C0AB64 /* JSTypedOMCSSStyleValueCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypedOMCSSStyleValueCustom.cpp; sourceTree = "<group>"; }; >+ 4BD781BC21C1964800D9703E /* StylePropertyMap.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = StylePropertyMap.idl; sourceTree = "<group>"; }; >+ 4BD781BE21C1965F00D9703E /* StylePropertyMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StylePropertyMap.h; sourceTree = "<group>"; }; >+ 4BD781C521C1D67700D9703E /* StylePropertyMapReadOnly.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = StylePropertyMapReadOnly.cpp; sourceTree = "<group>"; }; > 4BDA3FF52151B6F000FD6604 /* DOMCSSRegisterCustomProperty.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSRegisterCustomProperty.idl; sourceTree = "<group>"; }; > 4BDA3FF72151B6F100FD6604 /* DOMCSSRegisterCustomProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCSSRegisterCustomProperty.cpp; sourceTree = "<group>"; }; > 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSCustomPropertyDescriptor.h; sourceTree = "<group>"; }; >@@ -18154,6 +18158,9 @@ > 4BAFD0DA21921EAD00C0AB64 /* typedom */ = { > isa = PBXGroup; > children = ( >+ 4BD781BE21C1965F00D9703E /* StylePropertyMap.h */, >+ 4BD781BC21C1964800D9703E /* StylePropertyMap.idl */, >+ 4BD781C521C1D67700D9703E /* StylePropertyMapReadOnly.cpp */, > 4BAFD0CE2190F9B400C0AB64 /* StylePropertyMapReadOnly.h */, > 4BAFD0D02190F9C200C0AB64 /* StylePropertyMapReadOnly.idl */, > 4B43864F219CD56100F8D3C5 /* TypedOMCSSImageValue.h */, >@@ -31154,6 +31161,7 @@ > BC5EB74E0E81E06700B25965 /* StyleMultiColData.h in Headers */, > E4DACE6A1D12E10B0075980F /* StylePendingResources.h in Headers */, > A80E6DFC0A199067007FB8C5 /* StyleProperties.h in Headers */, >+ 4BD781BF21C1965F00D9703E /* StylePropertyMap.h in Headers */, > 4BAFD0CF2190F9B500C0AB64 /* StylePropertyMapReadOnly.h in Headers */, > E1B25107152A0BB00069B779 /* StylePropertyShorthand.h in Headers */, > 83C05A5B1A686212007E5DEA /* StylePropertyShorthandFunctions.h in Headers */, >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index 6d1c518b31e8f2252fb13cf9c3c66bc629d2945e..fb675493e0b12a96cd012abdfde041ac5d119e0b 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -177,6 +177,7 @@ namespace WebCore { > macro(SpectreGadget) \ > macro(StaticRange) \ > macro(StylePropertyMapReadOnly) \ >+ macro(StylePropertyMap) \ > macro(VRDisplay) \ > macro(VRDisplayCapabilities) \ > macro(VRDisplayEvent) \ >diff --git a/Source/WebCore/css/ElementCSSInlineStyle.idl b/Source/WebCore/css/ElementCSSInlineStyle.idl >index cfe72396f60381023c4b1da788d05d6725d36224..5ea98d87bbe2c45539266c3abbd4d684e9708fd9 100644 >--- a/Source/WebCore/css/ElementCSSInlineStyle.idl >+++ b/Source/WebCore/css/ElementCSSInlineStyle.idl >@@ -29,4 +29,5 @@ > NoInterfaceObject, > ] interface ElementCSSInlineStyle { > [ImplementedAs=cssomStyle, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; // FIXME: Should be [SameObject]. >+ [ImplementedAs=ensureAttributeStyleMap, CachedAttribute, EnabledAtRuntime=CSSTypedOM, Conditional=CSS_TYPED_OM] readonly attribute StylePropertyMap attributeStyleMap; // FIXME: Should be [SameObject]. > }; >diff --git a/Source/WebCore/css/typedom/StylePropertyMap.h b/Source/WebCore/css/typedom/StylePropertyMap.h >new file mode 100644 >index 0000000000000000000000000000000000000000..7b19f95dde8ef02f0365484a2c5ea8c2971feb80 >--- /dev/null >+++ b/Source/WebCore/css/typedom/StylePropertyMap.h >@@ -0,0 +1,42 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(CSS_TYPED_OM) >+ >+#include "StylePropertyMapReadOnly.h" >+#include <wtf/HashMap.h> >+#include <wtf/RefCounted.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+class StylePropertyMap : public StylePropertyMapReadOnly { >+}; >+ >+} // namespace WebCore >+ >+#endif >diff --git a/Source/WebCore/css/typedom/StylePropertyMap.idl b/Source/WebCore/css/typedom/StylePropertyMap.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..8692549a3dd4e9399d59f4a01ac908fcddc06fd3 >--- /dev/null >+++ b/Source/WebCore/css/typedom/StylePropertyMap.idl >@@ -0,0 +1,33 @@ >+/* >+* Copyright (C) 2018 Apple Inc. All rights reserved. >+* >+* Redistribution and use in source and binary forms, with or without >+* modification, are permitted provided that the following conditions >+* are met: >+* 1. Redistributions of source code must retain the above copyright >+* notice, this list of conditions and the following disclaimer. >+* 2. Redistributions in binary form must reproduce the above copyright >+* notice, this list of conditions and the following disclaimer in the >+* documentation and/or other materials provided with the distribution. >+* >+* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+*/ >+ >+[ >+ EnabledAtRuntime=CSSTypedOM, >+ Conditional=CSS_TYPED_OM, >+ Exposed=(Window), >+ SkipVTableValidation, >+ JSGenerateToJSObject >+] interface StylePropertyMap : StylePropertyMapReadOnly { >+}; >diff --git a/Source/WebCore/css/typedom/StylePropertyMapReadOnly.cpp b/Source/WebCore/css/typedom/StylePropertyMapReadOnly.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..6084e74ec52edd38feab19550f9b6434130e0217 >--- /dev/null >+++ b/Source/WebCore/css/typedom/StylePropertyMapReadOnly.cpp >@@ -0,0 +1,78 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * >+ * 1. Redistributions of source code must retain the above >+ * copyright notice, this list of conditions and the following >+ * disclaimer. >+ * 2. Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following >+ * disclaimer in the documentation and/or other materials >+ * provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER âAS ISâ AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE >+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, >+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR >+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF >+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >+ * SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "StylePropertyMapReadOnly.h" >+ >+#if ENABLE(CSS_TYPED_OM) >+ >+#include "CSSImageValue.h" >+#include "TypedOMCSSImageValue.h" >+#include "TypedOMCSSUnitValue.h" >+#include "TypedOMCSSUnparsedValue.h" >+#include <wtf/HashMap.h> >+ >+namespace WebCore { >+ >+ >+RefPtr<TypedOMCSSStyleValue> StylePropertyMapReadOnly::reifyValue(CSSValue* value, Document& document, Element*) >+{ >+ if (!value) >+ return nullptr; >+ >+ // FIXME: Properly reify all length values. >+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).primitiveType() == CSSPrimitiveValue::CSS_PX) >+ return TypedOMCSSUnitValue::create(downcast<CSSPrimitiveValue>(*value).doubleValue(), "px"); >+ >+ if (is<CSSImageValue>(*value)) >+ return TypedOMCSSImageValue::create(downcast<CSSImageValue>(*value), document); >+ >+ // FIXME: should use raw TypedOMCSSStyleValue >+ return TypedOMCSSUnparsedValue::create(value->cssText()); >+} >+ >+RefPtr<TypedOMCSSStyleValue> StylePropertyMapReadOnly::customPropertyValueOrDefault(const String& name, Document& document, CSSValue* inputValue, Element* element) >+{ >+ if (!inputValue) { >+ auto* registered = document.getCSSRegisteredCustomPropertySet().get(name); >+ >+ if (registered && registered->initialValue()) { >+ auto value = registered->initialValueCopy(); >+ return StylePropertyMapReadOnly::reifyValue(value.get(), document, element); >+ } >+ >+ return TypedOMCSSUnparsedValue::create(emptyString()); >+ } >+ >+ return StylePropertyMapReadOnly::reifyValue(inputValue, document, element); >+} >+ >+} // namespace WebCore >+ >+#endif >diff --git a/Source/WebCore/css/typedom/StylePropertyMapReadOnly.h b/Source/WebCore/css/typedom/StylePropertyMapReadOnly.h >index 1b15154230d743451362cbbceea6b6d9a83c6a9b..1c0762479116839a6788dee868d267f58694089c 100644 >--- a/Source/WebCore/css/typedom/StylePropertyMapReadOnly.h >+++ b/Source/WebCore/css/typedom/StylePropertyMapReadOnly.h >@@ -27,29 +27,24 @@ > > #if ENABLE(CSS_TYPED_OM) > >-#include "TypedOMCSSStyleValue.h" >-#include <wtf/HashMap.h> > #include <wtf/RefCounted.h> >+#include <wtf/UniqueRef.h> > #include <wtf/text/WTFString.h> > > namespace WebCore { >+class CSSValue; >+class Document; >+class Element; >+class StyledElement; >+class TypedOMCSSStyleValue; > > class StylePropertyMapReadOnly : public RefCounted<StylePropertyMapReadOnly> { > public: >- static Ref<StylePropertyMapReadOnly> create(HashMap<String, Ref<TypedOMCSSStyleValue>>&& map) >- { >- return adoptRef(*new StylePropertyMapReadOnly(WTFMove(map))); >- } >+ virtual ~StylePropertyMapReadOnly() = default; >+ virtual RefPtr<TypedOMCSSStyleValue> get(const String& property) const = 0; > >- TypedOMCSSStyleValue* get(String property) const { return m_map.get(property); } >- >-private: >- explicit StylePropertyMapReadOnly(HashMap<String, Ref<TypedOMCSSStyleValue>>&& map) >- : m_map(WTFMove(map)) >- { >- } >- >- HashMap<String, Ref<TypedOMCSSStyleValue>> m_map; >+ static RefPtr<TypedOMCSSStyleValue> reifyValue(CSSValue*, Document&, Element* = nullptr); >+ static RefPtr<TypedOMCSSStyleValue> customPropertyValueOrDefault(const String& name, Document&, CSSValue*, Element* = nullptr); > }; > > } // namespace WebCore >diff --git a/Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl b/Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl >index ce0b5123db3c8402d59fea37674f4202e04f4161..662a4adee55ae47413824fb74288ef67216d386c 100644 >--- a/Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl >+++ b/Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl >@@ -27,7 +27,8 @@ > EnabledAtRuntime=CSSTypedOM, > Conditional=CSS_TYPED_OM, > Exposed=(Window,Worker,PaintWorklet), >- ImplementationLacksVTable >+ SkipVTableValidation, >+ JSGenerateToJSObject, > ] interface StylePropertyMapReadOnly { > // FIXME: should be (undefined or TypedOMCSSStyleValue), not null > TypedOMCSSStyleValue? get(USVString property); >diff --git a/Source/WebCore/css/typedom/TypedOMCSSImageValue.h b/Source/WebCore/css/typedom/TypedOMCSSImageValue.h >index 892d2c6040af9415d93f485f1b162960090c1955..28c2b1ae6dc3c13b24f68171475a9fca0b8c91ee 100644 >--- a/Source/WebCore/css/typedom/TypedOMCSSImageValue.h >+++ b/Source/WebCore/css/typedom/TypedOMCSSImageValue.h >@@ -39,27 +39,27 @@ namespace WebCore { > > class TypedOMCSSImageValue final : public TypedOMCSSStyleValue { > public: >- static Ref<TypedOMCSSImageValue> create(CSSImageValue& cssValue, RenderElement& renderer) >+ static Ref<TypedOMCSSImageValue> create(CSSImageValue& cssValue, Document& document) > { >- return adoptRef(*new TypedOMCSSImageValue(cssValue, renderer)); >+ return adoptRef(*new TypedOMCSSImageValue(cssValue, document)); > } > > String toString() final { return m_cssValue->cssText(); } > > CachedImage* image() { return m_cssValue->cachedImage(); } >- const RenderElement* renderer() const { return m_renderer.get(); } >+ Document* document() const { return m_document.get(); } > > private: >- TypedOMCSSImageValue(CSSImageValue& cssValue, RenderElement& renderer) >+ TypedOMCSSImageValue(CSSImageValue& cssValue, Document& document) > : m_cssValue(makeRef(cssValue)) >- , m_renderer(makeWeakPtr(renderer)) >+ , m_document(makeWeakPtr(document)) > { > } > > bool isImageValue() final { return true; } > > Ref<CSSImageValue> m_cssValue; >- WeakPtr<RenderElement> m_renderer; >+ WeakPtr<Document> m_document; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 32a393553b8eb7bf6bb5d9fb48da2d16dbaa6a5c..68ff5ca363a1d5fe9a530b9d2c8a8864b978b3d3 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -4105,4 +4105,18 @@ Vector<RefPtr<WebAnimation>> Element::getAnimations() > return animations; > } > >+#if ENABLE(CSS_TYPED_OM) >+StylePropertyMap* Element::attributeStyleMap() >+{ >+ if (!hasRareData()) >+ return nullptr; >+ return elementRareData()->attributeStyleMap(); >+} >+ >+void Element::setAttributeStyleMap(Ref<StylePropertyMap>&& map) >+{ >+ ensureElementRareData().setAttributeStyleMap(WTFMove(map)); >+} >+#endif >+ > } // namespace WebCore >diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h >index 731e076168df21a1008795b0bf919b9a8e25b200..f44948815aca3d71e113415ee500e803cc93c744 100644 >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -54,6 +54,7 @@ class PlatformMouseEvent; > class PlatformWheelEvent; > class PseudoElement; > class RenderTreePosition; >+class StylePropertyMap; > class WebAnimation; > struct ElementStyle; > struct ScrollIntoViewOptions; >@@ -608,6 +609,11 @@ protected: > > static ExceptionOr<void> mergeWithNextTextNode(Text&); > >+#if ENABLE(CSS_TYPED_OM) >+ StylePropertyMap* attributeStyleMap(); >+ void setAttributeStyleMap(Ref<StylePropertyMap>&&); >+#endif >+ > private: > Frame* documentFrameWithNonNullView() const; > >diff --git a/Source/WebCore/dom/ElementRareData.cpp b/Source/WebCore/dom/ElementRareData.cpp >index 6cfa8096d3f58407dd0a86cc73f8f7e0c360e579..4dd60eb84f63d12fe814e36c35cc501224cc9711 100644 >--- a/Source/WebCore/dom/ElementRareData.cpp >+++ b/Source/WebCore/dom/ElementRareData.cpp >@@ -47,6 +47,9 @@ struct SameSizeAsElementRareData : NodeRareData { > #if ENABLE(INTERSECTION_OBSERVER) > void* intersectionObserverData; > #endif >+#if ENABLE(CSS_TYPED_OM) >+ void* typedOMData; >+#endif > > }; > >diff --git a/Source/WebCore/dom/ElementRareData.h b/Source/WebCore/dom/ElementRareData.h >index e9a03b93b475f1e1d73bb47fd02760425bfb5981..fe80e331d5cb210ba7b05d219278a037591b939f 100644 >--- a/Source/WebCore/dom/ElementRareData.h >+++ b/Source/WebCore/dom/ElementRareData.h >@@ -30,6 +30,7 @@ > #include "PseudoElement.h" > #include "RenderElement.h" > #include "ShadowRoot.h" >+#include "StylePropertyMap.h" > > namespace WebCore { > >@@ -127,6 +128,11 @@ public: > void setIntersectionObserverData(std::unique_ptr<IntersectionObserverData>&& data) { m_intersectionObserverData = WTFMove(data); } > #endif > >+#if ENABLE(CSS_TYPED_OM) >+ StylePropertyMap* attributeStyleMap() { return m_attributeStyleMap.get(); } >+ void setAttributeStyleMap(Ref<StylePropertyMap>&& map) { m_attributeStyleMap = WTFMove(map); } >+#endif >+ > #if DUMP_NODE_STATISTICS > OptionSet<UseType> useTypes() const > { >@@ -202,6 +208,10 @@ private: > RefPtr<PseudoElement> m_beforePseudoElement; > RefPtr<PseudoElement> m_afterPseudoElement; > >+#if ENABLE(CSS_TYPED_OM) >+ RefPtr<StylePropertyMap> m_attributeStyleMap; >+#endif >+ > void releasePseudoElement(PseudoElement*); > }; > >diff --git a/Source/WebCore/dom/StyledElement.cpp b/Source/WebCore/dom/StyledElement.cpp >index f52363625f264d246007bd1ae04b13c9cf198e9c..38685df280dc194f1cc0c0c5516473ffb7d43342 100644 >--- a/Source/WebCore/dom/StyledElement.cpp >+++ b/Source/WebCore/dom/StyledElement.cpp >@@ -25,20 +25,26 @@ > #include "StyledElement.h" > > #include "AttributeChangeInvalidation.h" >+#include "CSSComputedStyleDeclaration.h" > #include "CSSImageValue.h" > #include "CSSParser.h" >+#include "CSSPrimitiveValue.h" >+#include "CSSPropertyParser.h" > #include "CSSStyleSheet.h" > #include "CSSValuePool.h" > #include "CachedResource.h" > #include "ContentSecurityPolicy.h" > #include "DOMTokenList.h" >+#include "ElementRareData.h" > #include "HTMLElement.h" > #include "HTMLParserIdioms.h" > #include "InspectorInstrumentation.h" > #include "PropertySetCSSStyleDeclaration.h" > #include "ScriptableDocumentParser.h" > #include "StyleProperties.h" >+#include "StylePropertyMap.h" > #include "StyleResolver.h" >+#include "TypedOMCSSUnparsedValue.h" > #include <wtf/HashFunctions.h> > #include <wtf/IsoMallocInlines.h> > >@@ -70,6 +76,55 @@ CSSStyleDeclaration& StyledElement::cssomStyle() > return ensureMutableInlineStyle().ensureInlineCSSStyleDeclaration(*this); > } > >+#if ENABLE(CSS_TYPED_OM) >+ >+class StyledElementInlineStylePropertyMap final : public StylePropertyMap { >+public: >+ static Ref<StylePropertyMap> create(StyledElement& element) >+ { >+ return adoptRef(*new StyledElementInlineStylePropertyMap(element)); >+ } >+ >+private: >+ RefPtr<TypedOMCSSStyleValue> get(const String& property) const final >+ { >+ return extractInlineProperty(property, m_element.get()); >+ } >+ >+ explicit StyledElementInlineStylePropertyMap(StyledElement& element) >+ : m_element(makeRef(element)) >+ { >+ } >+ >+ static RefPtr<TypedOMCSSStyleValue> extractInlineProperty(const String& name, StyledElement& element) >+ { >+ if (!element.inlineStyle()) >+ return nullptr; >+ >+ if (isCustomPropertyName(name)) { >+ auto value = element.inlineStyle()->getCustomPropertyCSSValue(name); >+ return StylePropertyMapReadOnly::customPropertyValueOrDefault(name, element.document(), value.get(), &element); >+ } >+ >+ CSSPropertyID propertyID = cssPropertyID(name); >+ if (!propertyID) >+ return nullptr; >+ >+ auto value = element.inlineStyle()->getPropertyCSSValue(propertyID); >+ return StylePropertyMapReadOnly::reifyValue(value.get(), element.document(), &element); >+ } >+ >+ Ref<StyledElement> m_element; >+}; >+ >+StylePropertyMap& StyledElement::ensureAttributeStyleMap() >+{ >+ if (!attributeStyleMap()) >+ setAttributeStyleMap(StyledElementInlineStylePropertyMap::create(*this)); >+ return *attributeStyleMap(); >+} >+#endif >+ > MutableStyleProperties& StyledElement::ensureMutableInlineStyle() > { > RefPtr<StyleProperties>& inlineStyle = ensureUniqueElementData().m_inlineStyle; >diff --git a/Source/WebCore/dom/StyledElement.h b/Source/WebCore/dom/StyledElement.h >index 0349fd55c090f06940a5fc929c00437b798345c8..c53d8e6157aa9d2750b8f89d084561aab10a2738 100644 >--- a/Source/WebCore/dom/StyledElement.h >+++ b/Source/WebCore/dom/StyledElement.h >@@ -35,6 +35,7 @@ class Attribute; > class MutableStyleProperties; > class PropertySetCSSStyleDeclaration; > class StyleProperties; >+class StylePropertyMap; > > class StyledElement : public Element { > WTF_MAKE_ISO_ALLOCATED(StyledElement); >@@ -57,6 +58,9 @@ public: > void synchronizeStyleAttributeInternal() const { StyledElement::synchronizeStyleAttributeInternal(const_cast<StyledElement*>(this)); } > > WEBCORE_EXPORT CSSStyleDeclaration& cssomStyle(); >+#if ENABLE(CSS_TYPED_OM) >+ StylePropertyMap& ensureAttributeStyleMap(); >+#endif > > const StyleProperties* presentationAttributeStyle() const; > virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) { } >diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >index c139a026914d995de2a126f91167476806bdf6c2..8383b0d3499f2d411ab784ebe28b624d85e05377 100644 >--- a/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >@@ -1442,10 +1442,11 @@ static inline FloatSize size(HTMLVideoElement& video) > #if ENABLE(CSS_TYPED_OM) > static inline FloatSize size(TypedOMCSSImageValue& image) > { >- LayoutSize size; >- if (auto* cachedImage = image.image()) >- size = cachedImage->imageSizeForRenderer(image.renderer(), 1.0f); // FIXME: Not sure about this, see fixme in size(HTMLImageElement&...) >- return size; >+ auto* cachedImage = image.image(); >+ if (!cachedImage) >+ return FloatSize(); >+ >+ return cachedImage->imageSizeForRenderer(nullptr, 1.0f); > } > #endif > >@@ -1512,13 +1513,12 @@ ExceptionOr<void> CanvasRenderingContext2DBase::drawImage(HTMLImageElement& imag > #if ENABLE(CSS_TYPED_OM) > ExceptionOr<void> CanvasRenderingContext2DBase::drawImage(TypedOMCSSImageValue& image, const FloatRect& srcRect, const FloatRect& dstRect) > { >- auto* renderer = image.renderer(); > auto* cachedImage = image.image(); >- if (!renderer || !cachedImage) >+ if (!cachedImage || !image.document()) > return { }; > FloatRect imageRect = FloatRect(FloatPoint(), size(image)); > >- auto result = drawImage(renderer->document(), cachedImage, renderer, imageRect, srcRect, dstRect, state().globalComposite, state().globalBlend); >+ auto result = drawImage(*image.document(), cachedImage, nullptr, imageRect, srcRect, dstRect, state().globalComposite, state().globalBlend); > > if (!result.hasException()) > checkOrigin(image); >diff --git a/Source/WebCore/platform/graphics/CustomPaintImage.cpp b/Source/WebCore/platform/graphics/CustomPaintImage.cpp >index b8f930c81a0a00bc427501a21de714017f66168a..c32e4f00fc284a20a68bd0f4635337abd44609dc 100644 >--- a/Source/WebCore/platform/graphics/CustomPaintImage.cpp >+++ b/Source/WebCore/platform/graphics/CustomPaintImage.cpp >@@ -39,6 +39,7 @@ > #include "JSCSSPaintCallback.h" > #include "PaintRenderingContext2D.h" > #include "RenderElement.h" >+#include "StylePropertyMap.h" > #include "TypedOMCSSImageValue.h" > #include "TypedOMCSSUnitValue.h" > #include "TypedOMCSSUnparsedValue.h" >@@ -57,6 +58,58 @@ CustomPaintImage::CustomPaintImage(PaintWorkletGlobalScope::PaintDefinition& def > > CustomPaintImage::~CustomPaintImage() = default; > >+static RefPtr<TypedOMCSSStyleValue> extractComputedProperty(const String& name, Element& element) >+{ >+ ComputedStyleExtractor extractor(&element); >+ >+ if (isCustomPropertyName(name)) { >+ auto value = extractor.customPropertyValue(name); >+ return StylePropertyMapReadOnly::customPropertyValueOrDefault(name, element.document(), value.get(), &element); >+ } >+ >+ CSSPropertyID propertyID = cssPropertyID(name); >+ if (!propertyID) >+ return nullptr; >+ >+ auto value = extractor.propertyValue(propertyID, DoNotUpdateLayout); >+ return StylePropertyMapReadOnly::reifyValue(value.get(), element.document(), &element); >+} >+ >+class HashMapStylePropertyMap final : public StylePropertyMap { >+public: >+ static Ref<StylePropertyMap> create(HashMap<String, RefPtr<TypedOMCSSStyleValue>>&& map) >+ { >+ return adoptRef(*new HashMapStylePropertyMap(WTFMove(map))); >+ } >+ >+ static RefPtr<TypedOMCSSStyleValue> extractComputedProperty(const String& name, Element& element) >+ { >+ ComputedStyleExtractor extractor(&element); >+ >+ if (isCustomPropertyName(name)) { >+ auto value = extractor.customPropertyValue(name); >+ return StylePropertyMapReadOnly::customPropertyValueOrDefault(name, element.document(), value.get(), &element); >+ } >+ >+ CSSPropertyID propertyID = cssPropertyID(name); >+ if (!propertyID) >+ return nullptr; >+ >+ auto value = extractor.propertyValue(propertyID, DoNotUpdateLayout); >+ return StylePropertyMapReadOnly::reifyValue(value.get(), element.document(), &element); >+ } >+ >+private: >+ explicit HashMapStylePropertyMap(HashMap<String, RefPtr<TypedOMCSSStyleValue>>&& map) >+ : m_map(WTFMove(map)) >+ { >+ } >+ >+ RefPtr<TypedOMCSSStyleValue> get(const String& property) const final { return makeRefPtr(m_map.get(property)); } >+ >+ HashMap<String, RefPtr<TypedOMCSSStyleValue>> m_map; >+}; >+ > ImageDrawResult CustomPaintImage::doCustomPaint(GraphicsContext& destContext, const FloatSize& destSize) > { > if (!m_element || !m_element->element() || !m_paintDefinition) >@@ -82,36 +135,15 @@ ImageDrawResult CustomPaintImage::doCustomPaint(GraphicsContext& destContext, co > return ImageDrawResult::DidNothing; > auto context = contextOrException.releaseReturnValue(); > >- HashMap<String, Ref<TypedOMCSSStyleValue>> propertyValues; >- ComputedStyleExtractor extractor(m_element->element()); >- >- for (auto& name : m_inputProperties) { >- RefPtr<CSSValue> value; >- if (isCustomPropertyName(name)) >- value = extractor.customPropertyValue(name); >- else { >- CSSPropertyID propertyID = cssPropertyID(name); >- if (!propertyID) >- return ImageDrawResult::DidNothing; >- value = extractor.propertyValue(propertyID, DoNotUpdateLayout); >- } >- >- if (!value) { >- propertyValues.add(name, TypedOMCSSUnparsedValue::create(emptyString())); >- continue; >- } >+ HashMap<String, RefPtr<TypedOMCSSStyleValue>> propertyValues; > >- // FIXME: Properly reify all length values. >- if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).primitiveType() == CSSPrimitiveValue::CSS_PX) >- propertyValues.add(name, TypedOMCSSUnitValue::create(downcast<CSSPrimitiveValue>(*value).doubleValue(), "px")); >- else if (is<CSSImageValue>(*value)) >- propertyValues.add(name, TypedOMCSSImageValue::create(downcast<CSSImageValue>(*value), *m_element)); >- else >- propertyValues.add(name, TypedOMCSSUnparsedValue::create(value->cssText())); >+ if (auto* element = m_element->element()) { >+ for (auto& name : m_inputProperties) >+ propertyValues.add(name, extractComputedProperty(name, *element)); > } > > auto size = CSSPaintSize::create(destSize.width(), destSize.height()); >- auto propertyMap = StylePropertyMapReadOnly::create(WTFMove(propertyValues)); >+ Ref<StylePropertyMapReadOnly> propertyMap = HashMapStylePropertyMap::create(WTFMove(propertyValues)); > > auto& vm = *paintConstructor.getObject()->vm(); > JSC::JSLockHolder lock(vm); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 7684fdcd82565b6fcb6526462b51721cb3687353..df6ea6c8e86d3c0c611b5496d3da5af6690a7133 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,21 @@ >+2018-12-17 Justin Michaud <justin_michaud@apple.com> >+ >+ CSS Typed OM should expose attributeStyleMap >+ https://bugs.webkit.org/show_bug.cgi?id=192671 >+ >+ Reviewed by Ryosuke Niwa. >+ >+ * css-typedom/attributeStyleMap-expected.txt: Added. >+ * css-typedom/attributeStyleMap.html: Added. >+ * css-typedom/sameobject-expected.txt: Added. >+ * css-typedom/sameobject.html: Added. >+ * fast/css-custom-paint/properties.html: >+ * platform/ios-wk1/TestExpectations: >+ * platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: Added. >+ * platform/mac-wk1/TestExpectations: >+ * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: Added. >+ * platform/win/TestExpectations: >+ > 2018-12-17 Eric Carlson <eric.carlson@apple.com> > > [MediaStream] A stream's first video frame should be rendered >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 46260f5754da65c8b3f93aee763d506f31cdbfa2..503929cbc220a5e0de889f6c53e6736fa060609b 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-17 Justin Michaud <justin_michaud@apple.com> >+ >+ CSS Typed OM should expose attributeStyleMap >+ https://bugs.webkit.org/show_bug.cgi?id=192671 >+ >+ Reviewed by Ryosuke Niwa. >+ >+ * web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt: >+ * web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt: >+ > 2018-12-14 Youenn Fablet <youenn@apple.com> > > getSenders/getReceivers() should not return closed transceiver senders/receivers >diff --git a/LayoutTests/css-typedom/attributeStyleMap-expected.txt b/LayoutTests/css-typedom/attributeStyleMap-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..5063bde42e5c2dc74f6ae408646bc163922044a2 >--- /dev/null >+++ b/LayoutTests/css-typedom/attributeStyleMap-expected.txt >@@ -0,0 +1,4 @@ >+ >+PASS test that element.attributeStyleMap exists >+PASS test that element.attributeStyleMap has a valid width value >+ >diff --git a/LayoutTests/css-typedom/attributeStyleMap.html b/LayoutTests/css-typedom/attributeStyleMap.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3b46592d4bff483f66ef3402ed6558ed395da98e >--- /dev/null >+++ b/LayoutTests/css-typedom/attributeStyleMap.html >@@ -0,0 +1,22 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSTypedOMEnabled=true ] --> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<meta name="author" title="Justin Michaud" href="mailto:justin_michaud@webkit.org"> >+<meta name="assert" content="Test element.attributeStyleMap basics"> >+<link rel="help" content="https://drafts.css-houdini.org/css-typed-om-1/"> >+ >+<div id="el" style = "width: 150px; height: 10em; --my-prop: hello;"></div> >+ >+<script> >+ test(function() { >+ assert_true(!!el.attributeStyleMap); >+ assert_true(el.attributeStyleMap instanceof StylePropertyMap); >+ }, 'test that element.attributeStyleMap exists'); >+ >+ test(function() { >+ assert_true(el.attributeStyleMap.get('width') instanceof CSSUnitValue); >+ assert_equals(el.attributeStyleMap.get('width').value, 150); >+ assert_equals(el.attributeStyleMap.get('width').unit, 'px'); >+ }, 'test that element.attributeStyleMap has a valid width value'); >+ >+</script> >diff --git a/LayoutTests/css-typedom/sameobject-expected.txt b/LayoutTests/css-typedom/sameobject-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..306b25b5f0c49e0b6182f17b08c2ab791e1323e1 >--- /dev/null >+++ b/LayoutTests/css-typedom/sameobject-expected.txt >@@ -0,0 +1,20 @@ >+Tests that idl [SameObject] is specified. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS element is still alive >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/css-typedom/sameobject.html b/LayoutTests/css-typedom/sameobject.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2e30b04208ce059b1317da64d8ab5b2ba89af7d2 >--- /dev/null >+++ b/LayoutTests/css-typedom/sameobject.html >@@ -0,0 +1,59 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSTypedOMEnabled=true ] --> >+<meta name="author" title="Justin Michaud" href="mailto:justin_michaud@webkit.org"> >+<meta name="assert" content="Test that the [SameObject] idl attribute is respected"> >+<script src="../resources/js-test-pre.js"></script> >+ >+<div id="el" style = "width: 150px; height: 10em; --my-prop: hello;"></div> >+ >+<script> >+description("Tests that idl [SameObject] is specified."); >+window.jsTestIsAsync = true; >+ >+function promiseChain(body, times) { >+ let i = 0; >+ return new Promise(function(resolve, reject) { >+ handle = setInterval(function() { >+ if (i >= times) { >+ clearInterval(handle); >+ resolve(); >+ return; >+ } >+ >+ body(); >+ >+ ++i; >+ }, 10); >+ }); >+} >+ >+function makeAlive() { >+ el.attributeStyleMap.alive = true; >+} >+ >+function isAlive() { >+ return !!el.attributeStyleMap.alive; >+} >+ >+function testAlive() { >+ if (isAlive()) { >+ testPassed("element is still alive"); >+ } else { >+ testFailed("element is not alive"); >+ } >+} >+ >+window.onload = function() { >+ setTimeout(function() { >+ makeAlive(); >+ testAlive() >+ >+ promiseChain(function() { >+ gc(); >+ testAlive(); >+ }, 10).then(function () { >+ finishJSTest(); >+ }); >+ }, 10); >+} >+</script> >+<script src="../resources/js-test-post.js"></script> >diff --git a/LayoutTests/fast/css-custom-paint/properties.html b/LayoutTests/fast/css-custom-paint/properties.html >index d9a4655b1ffa458d4ffc8db9795748f29bb00209..679bcf50ec2535f6c4cc2c7cebf9e480f4eedd98 100644 >--- a/LayoutTests/fast/css-custom-paint/properties.html >+++ b/LayoutTests/fast/css-custom-paint/properties.html >@@ -12,10 +12,17 @@ > --my-prop:helloworld1; > --my-registered-prop:helloworld2; > } >+ >+ .paint2 { >+ background-image: paint(my-paint,150px,helloworld1,initialValueProp); >+ width: 150px; >+ height: 150px; >+ --my-prop:helloworld1; >+ } > </style> > > <div class="paint"></div> >-<div class="paint"></div> >+<div class="paint2"></div> > > <script id="code" type="text/worklet"> > class MyPaint { >@@ -27,6 +34,7 @@ class MyPaint { > testThis() { return this.myAttribute; } > > paint(ctx, geom, properties, args) { >+ assert_true(properties instanceof StylePropertyMapReadOnly); > assert_equals(properties.get('height').toString(), args[0].toString()); > assert_equals(properties.get('height').value, 150); > assert_equals(properties.get('height').unit, 'px'); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt >index 1366c0adb361b1c0c042b449653499b0d276acda..fc9d4955ea4829f16e116084bdcbd0f8788ee2d6 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom.tentative-expected.txt >@@ -22,48 +22,48 @@ FAIL First computed value correctly reified in space-separated list The given in > FAIL First computed value correctly reified in comma-separated list The given initial value does not parse for the given syntax. > FAIL All computed values correctly reified in space-separated list The given initial value does not parse for the given syntax. > FAIL All computed values correctly reified in comma-separated list The given initial value does not parse for the given syntax. >-FAIL attributeStyleMap.get returns CSSUnparsedValue for value with var references undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnparsedValue for value with var references target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnparsedValue for value with var references undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnparsedValue for value with var references in list undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnparsedValue for value with var references in list target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnparsedValue for value with var references in list undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnparsedValue for * undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnparsedValue for * target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnparsedValue for * undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <angle> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <angle> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <angle> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSStyleValue for <color> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSStyleValue for <color> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSStyleValue for <color> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSKeywordValue for <custom-ident> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSKeywordValue for <custom-ident> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSKeywordValue for <custom-ident> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSImageValue for <image> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSImageValue for <image> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSImageValue for <image> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <integer> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <integer> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <integer> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10%] undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10%] target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <length-percentage> [10%] undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10px] undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10px] target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <length-percentage> [10px] undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)] undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)] target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)] undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <length> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <length> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <length> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <number> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <number> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <number> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <percentage> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <percentage> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <percentage> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <resolution> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <resolution> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <resolution> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <time> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <time> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <time> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSStyleValue for <url> undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSStyleValue for <url> target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSStyleValue for <url> undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSKeywordValue for thing1 | THING2 undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSKeywordValue for thing1 | THING2 target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSKeywordValue for thing1 | THING2 undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <length>+ undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <length>+ target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <length>+ undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.get returns CSSUnitValue for <length># undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.get returns CSSUnitValue for <length># target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.get returns CSSUnitValue for <length># undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.getAll returns a list of CSSUnitValues for <length>+ undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.getAll returns a list of CSSUnitValues for <length>+ target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.getAll returns a list of CSSUnitValues for <length>+ undefined is not an object (evaluating 'rule.styleMap.clear') >-FAIL attributeStyleMap.getAll returns a list of CSSUnitValues for <length># undefined is not an object (evaluating 'target.attributeStyleMap.clear') >+FAIL attributeStyleMap.getAll returns a list of CSSUnitValues for <length># target.attributeStyleMap.clear is not a function. (In 'target.attributeStyleMap.clear()', 'target.attributeStyleMap.clear' is undefined) > FAIL styleMap.getAll returns a list of CSSUnitValues for <length># undefined is not an object (evaluating 'rule.styleMap.clear') > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt >index c06da9ba73d569b14e1710522cdcf33dda34cf10..b7208659a08196731f8f73c58a877ae4056b134c 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt >@@ -1,4 +1,4 @@ >-CONSOLE MESSAGE: line 63: TypeError: undefined is not an object (evaluating 'element.attributeStyleMap.clear') >+CONSOLE MESSAGE: line 63: TypeError: element.attributeStyleMap.clear is not a function. (In 'element.attributeStyleMap.clear()', 'element.attributeStyleMap.clear' is undefined) > >-FAIL Untitled TypeError: undefined is not an object (evaluating 'element.attributeStyleMap.clear') >+FAIL Untitled TypeError: element.attributeStyleMap.clear is not a function. (In 'element.attributeStyleMap.clear()', 'element.attributeStyleMap.clear' is undefined) > >diff --git a/LayoutTests/platform/ios-wk1/TestExpectations b/LayoutTests/platform/ios-wk1/TestExpectations >index 8c6bc5df332c501683da1714157daf9433726a32..31dd1e304cd982c0da85e70aca30cca538b31887 100644 >--- a/LayoutTests/platform/ios-wk1/TestExpectations >+++ b/LayoutTests/platform/ios-wk1/TestExpectations >@@ -2000,5 +2000,6 @@ webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-s > # Not supported on WK1 > css-custom-properties-api [ Skip ] > fast/css-custom-paint [ Skip ] >+css-typedom [ Skip ] > > webkit.org/b/188762 fast/writing-mode/english-rl-text-with-spelling-marker.html [ ImageOnlyFailure ] >diff --git a/LayoutTests/platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt b/LayoutTests/platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..245f7b7f5b10f0d2be248c220b581b5b17a259aa >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt >@@ -0,0 +1,196 @@ >+Checks that get_by_pname doesn't get confused about which properties go where when it comes to stacic properties. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS a["foo"] is 1 >+PASS a["bar"] is 2 >+PASS a["wibble"] is 3 >+PASS a["hick"] is 4 >+PASS a["hock"] is 5 >+PASS a["snood"] is 6 >+PASS a["charset"] is >+PASS a["coords"] is >+PASS a["download"] is >+PASS a["hreflang"] is >+PASS a["name"] is >+PASS a["ping"] is >+PASS a["rel"] is >+PASS a["rev"] is >+PASS a["shape"] is >+PASS a["target"] is >+PASS a["type"] is >+PASS a["text"] is nerget >+PASS a["relList"] is >+PASS a["origin"] is file:// >+PASS a["protocol"] is file: >+PASS a["username"] is >+PASS a["password"] is >+PASS a["host"] is >+PASS a["hostname"] is >+PASS a["port"] is >+PASS a["search"] is >+PASS a["hash"] is >+PASS a["title"] is >+PASS a["lang"] is >+PASS a["translate"] is true >+PASS a["dir"] is >+PASS a["dataset"] is [object DOMStringMap] >+PASS a["hidden"] is false >+PASS a["tabIndex"] is 0 >+PASS a["accessKey"] is >+PASS a["draggable"] is true >+PASS a["spellcheck"] is true >+PASS a["innerText"] is nerget >+PASS a["contentEditable"] is inherit >+PASS a["isContentEditable"] is false >+PASS a["offsetParent"] is [object HTMLBodyElement] >+PASS a["offsetTop"] is 714 >+PASS a["offsetLeft"] is 8 >+PASS a["offsetWidth"] is 40 >+PASS a["offsetHeight"] is 18 >+PASS a["outerText"] is nerget >+PASS a["webkitdropzone"] is >+PASS a["inputMode"] is >+PASS a["style"] is [object CSSStyleDeclaration] >+PASS a["attributeStyleMap"] is [object StylePropertyMap] >+PASS a["onabort"] is null >+PASS a["onblur"] is null >+PASS a["oncanplay"] is null >+PASS a["oncanplaythrough"] is null >+PASS a["onchange"] is null >+PASS a["onclick"] is null >+PASS a["oncontextmenu"] is null >+PASS a["oncuechange"] is null >+PASS a["ondblclick"] is null >+PASS a["ondrag"] is null >+PASS a["ondragend"] is null >+PASS a["ondragenter"] is null >+PASS a["ondragleave"] is null >+PASS a["ondragover"] is null >+PASS a["ondragstart"] is null >+PASS a["ondrop"] is null >+PASS a["ondurationchange"] is null >+PASS a["onemptied"] is null >+PASS a["onended"] is null >+PASS a["onerror"] is null >+PASS a["onfocus"] is null >+PASS a["oninput"] is null >+PASS a["oninvalid"] is null >+PASS a["onkeydown"] is null >+PASS a["onkeypress"] is null >+PASS a["onkeyup"] is null >+PASS a["onload"] is null >+PASS a["onloadeddata"] is null >+PASS a["onloadedmetadata"] is null >+PASS a["onloadstart"] is null >+PASS a["onmousedown"] is null >+PASS a["onmouseenter"] is null >+PASS a["onmouseleave"] is null >+PASS a["onmousemove"] is null >+PASS a["onmouseout"] is null >+PASS a["onmouseover"] is null >+PASS a["onmouseup"] is null >+PASS a["onmousewheel"] is null >+PASS a["onpause"] is null >+PASS a["onplay"] is null >+PASS a["onplaying"] is null >+PASS a["onprogress"] is null >+PASS a["onratechange"] is null >+PASS a["onrejectionhandled"] is null >+PASS a["onreset"] is null >+PASS a["onresize"] is null >+PASS a["onscroll"] is null >+PASS a["onseeked"] is null >+PASS a["onseeking"] is null >+PASS a["onselect"] is null >+PASS a["onstalled"] is null >+PASS a["onsubmit"] is null >+PASS a["onsuspend"] is null >+PASS a["ontimeupdate"] is null >+PASS a["ontoggle"] is null >+PASS a["onunhandledrejection"] is null >+PASS a["onvolumechange"] is null >+PASS a["onwaiting"] is null >+PASS a["ontransitionend"] is null >+PASS a["ontransitionrun"] is null >+PASS a["ontransitionstart"] is null >+PASS a["ontransitioncancel"] is null >+PASS a["onanimationend"] is null >+PASS a["onanimationiteration"] is null >+PASS a["onanimationstart"] is null >+PASS a["onanimationcancel"] is null >+PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml >+PASS a["prefix"] is null >+PASS a["localName"] is a >+PASS a["tagName"] is A >+PASS a["id"] is foo >+PASS a["className"] is >+PASS a["classList"] is >+PASS a["slot"] is >+PASS a["attributes"] is [object NamedNodeMap] >+PASS a["shadowRoot"] is null >+PASS a["scrollTop"] is 0 >+PASS a["scrollLeft"] is 0 >+PASS a["scrollWidth"] is 0 >+PASS a["scrollHeight"] is 0 >+PASS a["clientTop"] is 0 >+PASS a["clientLeft"] is 0 >+PASS a["clientWidth"] is 0 >+PASS a["clientHeight"] is 0 >+PASS a["innerHTML"] is nerget >+PASS a["outerHTML"] is <a id="foo" href="bar">nerget</a> >+PASS a["onaccessiblecontextmenu"] is null >+PASS a["onaccessibleclick"] is null >+PASS a["onaccessibledecrement"] is null >+PASS a["onaccessibledismiss"] is null >+PASS a["onaccessiblefocus"] is null >+PASS a["onaccessibleincrement"] is null >+PASS a["onaccessiblescrollintoview"] is null >+PASS a["onaccessiblesetvalue"] is null >+PASS a["onaccessibleselect"] is null >+PASS a["oncopy"] is null >+PASS a["oncut"] is null >+PASS a["onpaste"] is null >+PASS a["previousElementSibling"] is [object HTMLDivElement] >+PASS a["nextElementSibling"] is [object HTMLScriptElement] >+PASS a["children"] is [object HTMLCollection] >+PASS a["firstElementChild"] is null >+PASS a["lastElementChild"] is null >+PASS a["childElementCount"] is 0 >+PASS a["assignedSlot"] is null >+PASS a["nodeType"] is 1 >+PASS a["nodeName"] is A >+PASS a["isConnected"] is true >+PASS a["ownerDocument"] is [object HTMLDocument] >+PASS a["parentNode"] is [object HTMLBodyElement] >+PASS a["parentElement"] is [object HTMLBodyElement] >+PASS a["childNodes"] is [object NodeList] >+PASS a["firstChild"] is [object Text] >+PASS a["lastChild"] is [object Text] >+PASS a["previousSibling"] is [object Text] >+PASS a["nextSibling"] is [object Text] >+PASS a["nodeValue"] is null >+PASS a["textContent"] is nerget >+PASS a["ELEMENT_NODE"] is 1 >+PASS a["ATTRIBUTE_NODE"] is 2 >+PASS a["TEXT_NODE"] is 3 >+PASS a["CDATA_SECTION_NODE"] is 4 >+PASS a["ENTITY_REFERENCE_NODE"] is 5 >+PASS a["ENTITY_NODE"] is 6 >+PASS a["PROCESSING_INSTRUCTION_NODE"] is 7 >+PASS a["COMMENT_NODE"] is 8 >+PASS a["DOCUMENT_NODE"] is 9 >+PASS a["DOCUMENT_TYPE_NODE"] is 10 >+PASS a["DOCUMENT_FRAGMENT_NODE"] is 11 >+PASS a["NOTATION_NODE"] is 12 >+PASS a["DOCUMENT_POSITION_DISCONNECTED"] is 1 >+PASS a["DOCUMENT_POSITION_PRECEDING"] is 2 >+PASS a["DOCUMENT_POSITION_FOLLOWING"] is 4 >+PASS a["DOCUMENT_POSITION_CONTAINS"] is 8 >+PASS a["DOCUMENT_POSITION_CONTAINED_BY"] is 16 >+PASS a["DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"] is 32 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+nerget >diff --git a/LayoutTests/platform/mac-wk1/TestExpectations b/LayoutTests/platform/mac-wk1/TestExpectations >index d2dfd2800b466055ab4924e1193548a6542a7018..0dfb6d449819f880de6df586c73c68bf60fdc047 100644 >--- a/LayoutTests/platform/mac-wk1/TestExpectations >+++ b/LayoutTests/platform/mac-wk1/TestExpectations >@@ -640,6 +640,7 @@ webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propaga > fast/css-custom-paint [ Skip ] > imported/w3c/web-platform-tests/css/css-properties-values-api/ [ Skip ] > css-custom-properties-api [ Skip ] >+css-typedom [ Skip ] > css-dark-mode [ Skip ] > > webkit.org/b/189908 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ] >diff --git a/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt b/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..245f7b7f5b10f0d2be248c220b581b5b17a259aa >--- /dev/null >+++ b/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt >@@ -0,0 +1,196 @@ >+Checks that get_by_pname doesn't get confused about which properties go where when it comes to stacic properties. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS a["foo"] is 1 >+PASS a["bar"] is 2 >+PASS a["wibble"] is 3 >+PASS a["hick"] is 4 >+PASS a["hock"] is 5 >+PASS a["snood"] is 6 >+PASS a["charset"] is >+PASS a["coords"] is >+PASS a["download"] is >+PASS a["hreflang"] is >+PASS a["name"] is >+PASS a["ping"] is >+PASS a["rel"] is >+PASS a["rev"] is >+PASS a["shape"] is >+PASS a["target"] is >+PASS a["type"] is >+PASS a["text"] is nerget >+PASS a["relList"] is >+PASS a["origin"] is file:// >+PASS a["protocol"] is file: >+PASS a["username"] is >+PASS a["password"] is >+PASS a["host"] is >+PASS a["hostname"] is >+PASS a["port"] is >+PASS a["search"] is >+PASS a["hash"] is >+PASS a["title"] is >+PASS a["lang"] is >+PASS a["translate"] is true >+PASS a["dir"] is >+PASS a["dataset"] is [object DOMStringMap] >+PASS a["hidden"] is false >+PASS a["tabIndex"] is 0 >+PASS a["accessKey"] is >+PASS a["draggable"] is true >+PASS a["spellcheck"] is true >+PASS a["innerText"] is nerget >+PASS a["contentEditable"] is inherit >+PASS a["isContentEditable"] is false >+PASS a["offsetParent"] is [object HTMLBodyElement] >+PASS a["offsetTop"] is 714 >+PASS a["offsetLeft"] is 8 >+PASS a["offsetWidth"] is 40 >+PASS a["offsetHeight"] is 18 >+PASS a["outerText"] is nerget >+PASS a["webkitdropzone"] is >+PASS a["inputMode"] is >+PASS a["style"] is [object CSSStyleDeclaration] >+PASS a["attributeStyleMap"] is [object StylePropertyMap] >+PASS a["onabort"] is null >+PASS a["onblur"] is null >+PASS a["oncanplay"] is null >+PASS a["oncanplaythrough"] is null >+PASS a["onchange"] is null >+PASS a["onclick"] is null >+PASS a["oncontextmenu"] is null >+PASS a["oncuechange"] is null >+PASS a["ondblclick"] is null >+PASS a["ondrag"] is null >+PASS a["ondragend"] is null >+PASS a["ondragenter"] is null >+PASS a["ondragleave"] is null >+PASS a["ondragover"] is null >+PASS a["ondragstart"] is null >+PASS a["ondrop"] is null >+PASS a["ondurationchange"] is null >+PASS a["onemptied"] is null >+PASS a["onended"] is null >+PASS a["onerror"] is null >+PASS a["onfocus"] is null >+PASS a["oninput"] is null >+PASS a["oninvalid"] is null >+PASS a["onkeydown"] is null >+PASS a["onkeypress"] is null >+PASS a["onkeyup"] is null >+PASS a["onload"] is null >+PASS a["onloadeddata"] is null >+PASS a["onloadedmetadata"] is null >+PASS a["onloadstart"] is null >+PASS a["onmousedown"] is null >+PASS a["onmouseenter"] is null >+PASS a["onmouseleave"] is null >+PASS a["onmousemove"] is null >+PASS a["onmouseout"] is null >+PASS a["onmouseover"] is null >+PASS a["onmouseup"] is null >+PASS a["onmousewheel"] is null >+PASS a["onpause"] is null >+PASS a["onplay"] is null >+PASS a["onplaying"] is null >+PASS a["onprogress"] is null >+PASS a["onratechange"] is null >+PASS a["onrejectionhandled"] is null >+PASS a["onreset"] is null >+PASS a["onresize"] is null >+PASS a["onscroll"] is null >+PASS a["onseeked"] is null >+PASS a["onseeking"] is null >+PASS a["onselect"] is null >+PASS a["onstalled"] is null >+PASS a["onsubmit"] is null >+PASS a["onsuspend"] is null >+PASS a["ontimeupdate"] is null >+PASS a["ontoggle"] is null >+PASS a["onunhandledrejection"] is null >+PASS a["onvolumechange"] is null >+PASS a["onwaiting"] is null >+PASS a["ontransitionend"] is null >+PASS a["ontransitionrun"] is null >+PASS a["ontransitionstart"] is null >+PASS a["ontransitioncancel"] is null >+PASS a["onanimationend"] is null >+PASS a["onanimationiteration"] is null >+PASS a["onanimationstart"] is null >+PASS a["onanimationcancel"] is null >+PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml >+PASS a["prefix"] is null >+PASS a["localName"] is a >+PASS a["tagName"] is A >+PASS a["id"] is foo >+PASS a["className"] is >+PASS a["classList"] is >+PASS a["slot"] is >+PASS a["attributes"] is [object NamedNodeMap] >+PASS a["shadowRoot"] is null >+PASS a["scrollTop"] is 0 >+PASS a["scrollLeft"] is 0 >+PASS a["scrollWidth"] is 0 >+PASS a["scrollHeight"] is 0 >+PASS a["clientTop"] is 0 >+PASS a["clientLeft"] is 0 >+PASS a["clientWidth"] is 0 >+PASS a["clientHeight"] is 0 >+PASS a["innerHTML"] is nerget >+PASS a["outerHTML"] is <a id="foo" href="bar">nerget</a> >+PASS a["onaccessiblecontextmenu"] is null >+PASS a["onaccessibleclick"] is null >+PASS a["onaccessibledecrement"] is null >+PASS a["onaccessibledismiss"] is null >+PASS a["onaccessiblefocus"] is null >+PASS a["onaccessibleincrement"] is null >+PASS a["onaccessiblescrollintoview"] is null >+PASS a["onaccessiblesetvalue"] is null >+PASS a["onaccessibleselect"] is null >+PASS a["oncopy"] is null >+PASS a["oncut"] is null >+PASS a["onpaste"] is null >+PASS a["previousElementSibling"] is [object HTMLDivElement] >+PASS a["nextElementSibling"] is [object HTMLScriptElement] >+PASS a["children"] is [object HTMLCollection] >+PASS a["firstElementChild"] is null >+PASS a["lastElementChild"] is null >+PASS a["childElementCount"] is 0 >+PASS a["assignedSlot"] is null >+PASS a["nodeType"] is 1 >+PASS a["nodeName"] is A >+PASS a["isConnected"] is true >+PASS a["ownerDocument"] is [object HTMLDocument] >+PASS a["parentNode"] is [object HTMLBodyElement] >+PASS a["parentElement"] is [object HTMLBodyElement] >+PASS a["childNodes"] is [object NodeList] >+PASS a["firstChild"] is [object Text] >+PASS a["lastChild"] is [object Text] >+PASS a["previousSibling"] is [object Text] >+PASS a["nextSibling"] is [object Text] >+PASS a["nodeValue"] is null >+PASS a["textContent"] is nerget >+PASS a["ELEMENT_NODE"] is 1 >+PASS a["ATTRIBUTE_NODE"] is 2 >+PASS a["TEXT_NODE"] is 3 >+PASS a["CDATA_SECTION_NODE"] is 4 >+PASS a["ENTITY_REFERENCE_NODE"] is 5 >+PASS a["ENTITY_NODE"] is 6 >+PASS a["PROCESSING_INSTRUCTION_NODE"] is 7 >+PASS a["COMMENT_NODE"] is 8 >+PASS a["DOCUMENT_NODE"] is 9 >+PASS a["DOCUMENT_TYPE_NODE"] is 10 >+PASS a["DOCUMENT_FRAGMENT_NODE"] is 11 >+PASS a["NOTATION_NODE"] is 12 >+PASS a["DOCUMENT_POSITION_DISCONNECTED"] is 1 >+PASS a["DOCUMENT_POSITION_PRECEDING"] is 2 >+PASS a["DOCUMENT_POSITION_FOLLOWING"] is 4 >+PASS a["DOCUMENT_POSITION_CONTAINS"] is 8 >+PASS a["DOCUMENT_POSITION_CONTAINED_BY"] is 16 >+PASS a["DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"] is 32 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+nerget >diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations >index 3987e9e6c634bdfe98ab53cb6ace61a93fb94232..f34aa0eac016f93c71162cd2728820cc0e83d866 100644 >--- a/LayoutTests/platform/win/TestExpectations >+++ b/LayoutTests/platform/win/TestExpectations >@@ -4133,6 +4133,7 @@ imported/blink/http/tests/security/mixedContent/websocket [ Skip ] > # Feature flag only enabled for wk2 > css-custom-properties-api [ Skip ] > fast/css-custom-paint [ Skip ] >+css-typedom [ Skip ] > > editing/pasteboard/drag-and-drop-color-input-events.html [ Skip ] >
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 192671
:
357241
|
357243
|
357272
|
357280
|
357282
|
357286
|
357287
|
357289
|
357296
|
357298
|
357343
|
357345
|
357347
|
357368
|
357538
|
357539
| 357574