| Differences between
and this patch
- a/Source/WebCore/ChangeLog +32 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2019-08-28  Rob Buis  <rbuis@igalia.com>
2
3
        Implement MathMLIDL / HTMLOrForeignElement
4
        https://bugs.webkit.org/show_bug.cgi?id=200470
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Tests: imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html
9
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html
10
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html
11
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html
12
13
        * CMakeLists.txt:
14
        * DerivedSources-input.xcfilelist:
15
        * DerivedSources-output.xcfilelist:
16
        * DerivedSources.make:
17
        * Sources.txt:
18
        * WebCore.xcodeproj/project.pbxproj:
19
        * bindings/js/JSElementCustom.cpp:
20
        (WebCore::createNewElementWrapper):  Expose MathML JS.
21
        * bindings/js/JSNodeCustom.cpp:
22
        (WebCore::createWrapperInline):  Expose MathML JS.
23
        * dom/StaticRange.h: Unified build fix.
24
        * html/HTMLElement.idl:
25
        * html/HTMLOrForeignElement.idl: Added.
26
        * mathml/MathMLElement.cpp:
27
        (WebCore::MathMLElement::parseAttribute):
28
        * mathml/MathMLElement.idl: Added.
29
        * mathml/MathMLMathElement.idl: Added.
30
        * mathml/mathtags.in:
31
        * svg/SVGElement.idl:
32
1
2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
33
2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2
34
3
        SVG2: Add length, item getter and item setter to all SVG lists
35
        SVG2: Add length, item getter and item setter to all SVG lists
- a/Source/WebCore/CMakeLists.txt +4 lines
Lines 824-829 set(WebCore_NON_SVG_IDL_FILES a/Source/WebCore/CMakeLists.txt_sec1
824
    html/HTMLOptGroupElement.idl
824
    html/HTMLOptGroupElement.idl
825
    html/HTMLOptionElement.idl
825
    html/HTMLOptionElement.idl
826
    html/HTMLOptionsCollection.idl
826
    html/HTMLOptionsCollection.idl
827
    html/HTMLOrForeignElement.idl
827
    html/HTMLOutputElement.idl
828
    html/HTMLOutputElement.idl
828
    html/HTMLParagraphElement.idl
829
    html/HTMLParagraphElement.idl
829
    html/HTMLParamElement.idl
830
    html/HTMLParamElement.idl
Lines 904-909 set(WebCore_NON_SVG_IDL_FILES a/Source/WebCore/CMakeLists.txt_sec2
904
905
905
    loader/appcache/DOMApplicationCache.idl
906
    loader/appcache/DOMApplicationCache.idl
906
907
908
    mathml/MathMLElement.idl
909
    mathml/MathMLMathElement.idl
910
907
    page/BarProp.idl
911
    page/BarProp.idl
908
    page/Crypto.idl
912
    page/Crypto.idl
909
    page/DOMSelection.idl
913
    page/DOMSelection.idl
- a/Source/WebCore/DerivedSources-input.xcfilelist +3 lines
Lines 712-717 $(PROJECT_DIR)/html/HTMLObjectElement.idl a/Source/WebCore/DerivedSources-input.xcfilelist_sec1
712
$(PROJECT_DIR)/html/HTMLOptGroupElement.idl
712
$(PROJECT_DIR)/html/HTMLOptGroupElement.idl
713
$(PROJECT_DIR)/html/HTMLOptionElement.idl
713
$(PROJECT_DIR)/html/HTMLOptionElement.idl
714
$(PROJECT_DIR)/html/HTMLOptionsCollection.idl
714
$(PROJECT_DIR)/html/HTMLOptionsCollection.idl
715
$(PROJECT_DIR)/html/HTMLOrForeignElement.idl
715
$(PROJECT_DIR)/html/HTMLOutputElement.idl
716
$(PROJECT_DIR)/html/HTMLOutputElement.idl
716
$(PROJECT_DIR)/html/HTMLParagraphElement.idl
717
$(PROJECT_DIR)/html/HTMLParagraphElement.idl
717
$(PROJECT_DIR)/html/HTMLParamElement.idl
718
$(PROJECT_DIR)/html/HTMLParamElement.idl
Lines 853-858 $(PROJECT_DIR)/inspector/InspectorAuditResourcesObject.idl a/Source/WebCore/DerivedSources-input.xcfilelist_sec2
853
$(PROJECT_DIR)/inspector/InspectorFrontendHost.idl
854
$(PROJECT_DIR)/inspector/InspectorFrontendHost.idl
854
$(PROJECT_DIR)/loader/appcache/DOMApplicationCache.idl
855
$(PROJECT_DIR)/loader/appcache/DOMApplicationCache.idl
855
$(PROJECT_DIR)/make-hash-tools.pl
856
$(PROJECT_DIR)/make-hash-tools.pl
857
$(PROJECT_DIR)/mathml/MathMLElement.idl
858
$(PROJECT_DIR)/mathml/MathMLMathElement.idl
856
$(PROJECT_DIR)/mathml/mathattrs.in
859
$(PROJECT_DIR)/mathml/mathattrs.in
857
$(PROJECT_DIR)/mathml/mathtags.in
860
$(PROJECT_DIR)/mathml/mathtags.in
858
$(PROJECT_DIR)/page/BarProp.idl
861
$(PROJECT_DIR)/page/BarProp.idl
- a/Source/WebCore/DerivedSources-output.xcfilelist +6 lines
Lines 775-780 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLMeterElement.cpp a/Source/WebCore/DerivedSources-output.xcfilelist_sec1
775
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLMeterElement.h
775
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLMeterElement.h
776
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLModElement.cpp
776
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLModElement.cpp
777
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLModElement.h
777
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLModElement.h
778
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOrForeignElement.cpp
779
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOrForeignElement.h
778
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOListElement.cpp
780
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOListElement.cpp
779
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOListElement.h
781
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOListElement.h
780
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLObjectElement.cpp
782
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLObjectElement.cpp
Lines 927-932 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMallocStatistics.cpp a/Source/WebCore/DerivedSources-output.xcfilelist_sec2
927
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMallocStatistics.h
929
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMallocStatistics.h
928
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.cpp
930
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.cpp
929
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.h
931
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElementWrapperFactory.h
932
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElement.cpp
933
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLElement.h
934
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLMathElement.cpp
935
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMathMLMathElement.h
930
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilities.cpp
936
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilities.cpp
931
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilities.h
937
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilities.h
932
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilitiesDecodingInfo.cpp
938
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSMediaCapabilitiesDecodingInfo.cpp
- a/Source/WebCore/DerivedSources.make +5 lines
Lines 78-83 VPATH = \ a/Source/WebCore/DerivedSources.make_sec1
78
    $(WebCore)/html/track \
78
    $(WebCore)/html/track \
79
    $(WebCore)/inspector \
79
    $(WebCore)/inspector \
80
    $(WebCore)/loader/appcache \
80
    $(WebCore)/loader/appcache \
81
    $(WebCore)/mathml \
81
    $(WebCore)/page \
82
    $(WebCore)/page \
82
    $(WebCore)/platform/network \
83
    $(WebCore)/platform/network \
83
    $(WebCore)/plugins \
84
    $(WebCore)/plugins \
Lines 716-721 JS_BINDING_IDLS = \ a/Source/WebCore/DerivedSources.make_sec2
716
    $(WebCore)/html/HTMLOptGroupElement.idl \
717
    $(WebCore)/html/HTMLOptGroupElement.idl \
717
    $(WebCore)/html/HTMLOptionElement.idl \
718
    $(WebCore)/html/HTMLOptionElement.idl \
718
    $(WebCore)/html/HTMLOptionsCollection.idl \
719
    $(WebCore)/html/HTMLOptionsCollection.idl \
720
    $(WebCore)/html/HTMLOrForeignElement.idl \
719
    $(WebCore)/html/HTMLOutputElement.idl \
721
    $(WebCore)/html/HTMLOutputElement.idl \
720
    $(WebCore)/html/HTMLParagraphElement.idl \
722
    $(WebCore)/html/HTMLParagraphElement.idl \
721
    $(WebCore)/html/HTMLParamElement.idl \
723
    $(WebCore)/html/HTMLParamElement.idl \
Lines 844-849 JS_BINDING_IDLS = \ a/Source/WebCore/DerivedSources.make_sec3
844
    $(WebCore)/html/track/VTTRegionList.idl \
846
    $(WebCore)/html/track/VTTRegionList.idl \
845
    $(WebCore)/html/track/VideoTrack.idl \
847
    $(WebCore)/html/track/VideoTrack.idl \
846
    $(WebCore)/html/track/VideoTrackList.idl \
848
    $(WebCore)/html/track/VideoTrackList.idl \
849
    $(WebCore)/mathml/MathMLElement.idl \
850
    $(WebCore)/mathml/MathMLMathElement.idl \
847
    $(WebCore)/inspector/CommandLineAPIHost.idl \
851
    $(WebCore)/inspector/CommandLineAPIHost.idl \
848
    $(WebCore)/inspector/InspectorAuditAccessibilityObject.idl \
852
    $(WebCore)/inspector/InspectorAuditAccessibilityObject.idl \
849
    $(WebCore)/inspector/InspectorAuditDOMObject.idl \
853
    $(WebCore)/inspector/InspectorAuditDOMObject.idl \
Lines 1679-1684 IDL_INCLUDES = \ a/Source/WebCore/DerivedSources.make_sec4
1679
    $(WebCore)/html/track \
1683
    $(WebCore)/html/track \
1680
    $(WebCore)/inspector \
1684
    $(WebCore)/inspector \
1681
    $(WebCore)/loader/appcache \
1685
    $(WebCore)/loader/appcache \
1686
    $(WebCore)/mathml \
1682
    $(WebCore)/page \
1687
    $(WebCore)/page \
1683
    $(WebCore)/plugins \
1688
    $(WebCore)/plugins \
1684
    $(WebCore)/storage \
1689
    $(WebCore)/storage \
- a/Source/WebCore/Sources.txt -1 / +5 lines
Lines 2560-2567 StylePropertyShorthandFunctions.cpp a/Source/WebCore/Sources.txt_sec1
2560
UserAgentStyleSheetsData.cpp
2560
UserAgentStyleSheetsData.cpp
2561
WebCoreJSBuiltinInternals.cpp
2561
WebCoreJSBuiltinInternals.cpp
2562
WebCoreJSBuiltins.cpp
2562
WebCoreJSBuiltins.cpp
2563
JSSVGElementWrapperFactory.cpp
2564
JSHTMLElementWrapperFactory.cpp
2563
JSHTMLElementWrapperFactory.cpp
2564
JSMathMLElementWrapperFactory.cpp
2565
JSSVGElementWrapperFactory.cpp
2565
2566
2566
// IDL bindings
2567
// IDL bindings
2567
// FIXME: We should probably move these into ${DerivedSources}/bindings/js/ so they get bundled with the custom bindings.
2568
// FIXME: We should probably move these into ${DerivedSources}/bindings/js/ so they get bundled with the custom bindings.
Lines 2889-2894 JSHTMLMenuItemElement.cpp a/Source/WebCore/Sources.txt_sec2
2889
JSHTMLMetaElement.cpp
2890
JSHTMLMetaElement.cpp
2890
JSHTMLMeterElement.cpp
2891
JSHTMLMeterElement.cpp
2891
JSHTMLModElement.cpp
2892
JSHTMLModElement.cpp
2893
JSHTMLOrForeignElement.cpp
2892
JSHTMLOListElement.cpp
2894
JSHTMLOListElement.cpp
2893
JSHTMLObjectElement.cpp
2895
JSHTMLObjectElement.cpp
2894
JSHTMLOptGroupElement.cpp
2896
JSHTMLOptGroupElement.cpp
Lines 2925-2930 JSHashChangeEvent.cpp a/Source/WebCore/Sources.txt_sec3
2925
JSHistory.cpp
2927
JSHistory.cpp
2926
JSHkdfParams.cpp
2928
JSHkdfParams.cpp
2927
JSHmacKeyParams.cpp
2929
JSHmacKeyParams.cpp
2930
JSMathMLElement.cpp
2931
JSMathMLMathElement.cpp
2928
JSIDBCursor.cpp
2932
JSIDBCursor.cpp
2929
JSIDBCursorDirection.cpp
2933
JSIDBCursorDirection.cpp
2930
JSIDBCursorWithValue.cpp
2934
JSIDBCursorWithValue.cpp
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +30 lines
Lines 11956-11961 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
11956
		A9EE448F210FD69A00B6EAE6 /* AccessibilityRole.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AccessibilityRole.idl; sourceTree = "<group>"; };
11956
		A9EE448F210FD69A00B6EAE6 /* AccessibilityRole.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AccessibilityRole.idl; sourceTree = "<group>"; };
11957
		AA0978ED0ABAA6E100874480 /* CSSCursorImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCursorImageValue.cpp; sourceTree = "<group>"; };
11957
		AA0978ED0ABAA6E100874480 /* CSSCursorImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCursorImageValue.cpp; sourceTree = "<group>"; };
11958
		AA0978EE0ABAA6E100874480 /* CSSCursorImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSCursorImageValue.h; sourceTree = "<group>"; };
11958
		AA0978EE0ABAA6E100874480 /* CSSCursorImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSCursorImageValue.h; sourceTree = "<group>"; };
11959
		AA11C04B23169689009D9831 /* MathMLMathElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MathMLMathElement.idl; sourceTree = "<group>"; };
11960
		AA11C04D2316973D009D9831 /* JSMathMLMathElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMathMLMathElement.cpp; sourceTree = "<group>"; };
11961
		AA11C04E23169782009D9831 /* JSMathMLMathElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMathMLMathElement.h; sourceTree = "<group>"; };
11959
		AA2A5AB816A485D500975A25 /* DOMWindowSpeechSynthesis.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowSpeechSynthesis.cpp; sourceTree = "<group>"; };
11962
		AA2A5AB816A485D500975A25 /* DOMWindowSpeechSynthesis.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowSpeechSynthesis.cpp; sourceTree = "<group>"; };
11960
		AA2A5AB916A485D500975A25 /* DOMWindowSpeechSynthesis.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMWindowSpeechSynthesis.h; sourceTree = "<group>"; };
11963
		AA2A5AB916A485D500975A25 /* DOMWindowSpeechSynthesis.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMWindowSpeechSynthesis.h; sourceTree = "<group>"; };
11961
		AA2A5ABA16A485D500975A25 /* DOMWindowSpeechSynthesis.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMWindowSpeechSynthesis.idl; sourceTree = "<group>"; };
11964
		AA2A5ABA16A485D500975A25 /* DOMWindowSpeechSynthesis.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMWindowSpeechSynthesis.idl; sourceTree = "<group>"; };
Lines 11978-11983 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
11978
		AA4C3A740B2B1679002334A2 /* InlineStyleSheetOwner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineStyleSheetOwner.cpp; sourceTree = "<group>"; };
11981
		AA4C3A740B2B1679002334A2 /* InlineStyleSheetOwner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineStyleSheetOwner.cpp; sourceTree = "<group>"; };
11979
		AA4C3A750B2B1679002334A2 /* InlineStyleSheetOwner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineStyleSheetOwner.h; sourceTree = "<group>"; };
11982
		AA4C3A750B2B1679002334A2 /* InlineStyleSheetOwner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InlineStyleSheetOwner.h; sourceTree = "<group>"; };
11980
		AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
11983
		AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
11984
		AA61BB5223167473002FE25A /* JSMathMLElementWrapperFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSMathMLElementWrapperFactory.cpp; path = DerivedSources/WebCore/JSMathMLElementWrapperFactory.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
11985
		AA61BB5423167474002FE25A /* JSMathMLElementWrapperFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSMathMLElementWrapperFactory.h; path = DerivedSources/WebCore/JSMathMLElementWrapperFactory.h; sourceTree = BUILT_PRODUCTS_DIR; };
11981
		AA7FEE9C16A4E6F3004C0C33 /* JSSpeechSynthesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesis.cpp; sourceTree = "<group>"; };
11986
		AA7FEE9C16A4E6F3004C0C33 /* JSSpeechSynthesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesis.cpp; sourceTree = "<group>"; };
11982
		AA7FEE9E16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesisUtterance.cpp; sourceTree = "<group>"; };
11987
		AA7FEE9E16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSpeechSynthesisUtterance.cpp; sourceTree = "<group>"; };
11983
		AA7FEE9F16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechSynthesisUtterance.h; sourceTree = "<group>"; };
11988
		AA7FEE9F16A4E6F3004C0C33 /* JSSpeechSynthesisUtterance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSpeechSynthesisUtterance.h; sourceTree = "<group>"; };
Lines 11990-11995 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
11990
		AAA728F316D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AXObjectCacheIOS.mm; sourceTree = "<group>"; };
11995
		AAA728F316D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AXObjectCacheIOS.mm; sourceTree = "<group>"; };
11991
		AAC08CF015F941FC00F1E188 /* AccessibilitySVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilitySVGRoot.cpp; sourceTree = "<group>"; };
11996
		AAC08CF015F941FC00F1E188 /* AccessibilitySVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilitySVGRoot.cpp; sourceTree = "<group>"; };
11992
		AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySVGRoot.h; sourceTree = "<group>"; };
11997
		AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySVGRoot.h; sourceTree = "<group>"; };
11998
		AACC83D42316568700EB6BF5 /* MathMLElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MathMLElement.idl; sourceTree = "<group>"; };
11999
		AACC83D62316569E00EB6BF5 /* HTMLOrForeignElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLOrForeignElement.idl; sourceTree = "<group>"; };
12000
		AACC83D72316576A00EB6BF5 /* JSHTMLOrForeignElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSHTMLOrForeignElement.h; sourceTree = "<group>"; };
12001
		AACC83D82316576B00EB6BF5 /* JSHTMLOrForeignElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOrForeignElement.cpp; sourceTree = "<group>"; };
12002
		AACC83DA231657EC00EB6BF5 /* JSMathMLElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMathMLElement.h; sourceTree = "<group>"; };
12003
		AACC83DB2316583200EB6BF5 /* JSMathMLElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMathMLElement.cpp; sourceTree = "<group>"; };
11993
		AAE27B7416CBFC0D00623043 /* PlatformSpeechSynthesizerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformSpeechSynthesizerMock.cpp; sourceTree = "<group>"; };
12004
		AAE27B7416CBFC0D00623043 /* PlatformSpeechSynthesizerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformSpeechSynthesizerMock.cpp; sourceTree = "<group>"; };
11994
		AAE27B7516CBFC0D00623043 /* PlatformSpeechSynthesizerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformSpeechSynthesizerMock.h; sourceTree = "<group>"; };
12005
		AAE27B7516CBFC0D00623043 /* PlatformSpeechSynthesizerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformSpeechSynthesizerMock.h; sourceTree = "<group>"; };
11995
		AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformSpeechSynthesizerIOS.mm; sourceTree = "<group>"; };
12006
		AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformSpeechSynthesizerIOS.mm; sourceTree = "<group>"; };
Lines 16504-16509 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
16504
				7C330A041DF9F93B00D3395C /* Geolocation */,
16515
				7C330A041DF9F93B00D3395C /* Geolocation */,
16505
				A83B79080CCAFF2B000B0825 /* HTML */,
16516
				A83B79080CCAFF2B000B0825 /* HTML */,
16506
				1C5FAECA0DCFD8C900D58F78 /* Inspector */,
16517
				1C5FAECA0DCFD8C900D58F78 /* Inspector */,
16518
				AACC83D92316578600EB6BF5 /* MATHML */,
16507
				CDAB6D2A17C7E97D00C60B34 /* MediaControls */,
16519
				CDAB6D2A17C7E97D00C60B34 /* MediaControls */,
16508
				CD61FE7B1794CA02004101EB /* MediaSource */,
16520
				CD61FE7B1794CA02004101EB /* MediaSource */,
16509
				07CFD99317D01405001C4FFC /* MediaStream */,
16521
				07CFD99317D01405001C4FFC /* MediaStream */,
Lines 19840-19845 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
19840
				1C24EEA71C72A7B40080F8FC /* JSFontFaceSet.h */,
19852
				1C24EEA71C72A7B40080F8FC /* JSFontFaceSet.h */,
19841
				938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */,
19853
				938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */,
19842
				938E65F009F09840008A48EC /* JSHTMLElementWrapperFactory.h */,
19854
				938E65F009F09840008A48EC /* JSHTMLElementWrapperFactory.h */,
19855
				AA61BB5223167473002FE25A /* JSMathMLElementWrapperFactory.cpp */,
19856
				AA61BB5423167474002FE25A /* JSMathMLElementWrapperFactory.h */,
19843
				8574D1F10ADE6122004CBA11 /* JSSVGElementWrapperFactory.cpp */,
19857
				8574D1F10ADE6122004CBA11 /* JSSVGElementWrapperFactory.cpp */,
19844
				8574D1F20ADE6122004CBA11 /* JSSVGElementWrapperFactory.h */,
19858
				8574D1F20ADE6122004CBA11 /* JSSVGElementWrapperFactory.h */,
19845
				FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */,
19859
				FABE72FB1059C21100D999DD /* MathMLElementFactory.cpp */,
Lines 21525-21530 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
21525
				9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */,
21539
				9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */,
21526
				A81369BE097374F500D74463 /* HTMLOptionsCollection.h */,
21540
				A81369BE097374F500D74463 /* HTMLOptionsCollection.h */,
21527
				85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */,
21541
				85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */,
21542
				AACC83D62316569E00EB6BF5 /* HTMLOrForeignElement.idl */,
21528
				4AD01005127E642A0015035F /* HTMLOutputElement.cpp */,
21543
				4AD01005127E642A0015035F /* HTMLOutputElement.cpp */,
21529
				4AD01006127E642A0015035F /* HTMLOutputElement.h */,
21544
				4AD01006127E642A0015035F /* HTMLOutputElement.h */,
21530
				4AD01007127E642A0015035F /* HTMLOutputElement.idl */,
21545
				4AD01007127E642A0015035F /* HTMLOutputElement.idl */,
Lines 22795-22800 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
22795
				A80E7E8F0A1A83E3007FB8C5 /* JSHTMLOptionElement.h */,
22810
				A80E7E8F0A1A83E3007FB8C5 /* JSHTMLOptionElement.h */,
22796
				448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */,
22811
				448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */,
22797
				448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */,
22812
				448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */,
22813
				AACC83D82316576B00EB6BF5 /* JSHTMLOrForeignElement.cpp */,
22814
				AACC83D72316576A00EB6BF5 /* JSHTMLOrForeignElement.h */,
22798
				4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */,
22815
				4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */,
22799
				4AD0173B127E82860015035F /* JSHTMLOutputElement.h */,
22816
				4AD0173B127E82860015035F /* JSHTMLOutputElement.h */,
22800
				1AE2AB9E0A1CE90500B42B25 /* JSHTMLParagraphElement.cpp */,
22817
				1AE2AB9E0A1CE90500B42B25 /* JSHTMLParagraphElement.cpp */,
Lines 23778-23783 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec8
23778
			path = ios;
23795
			path = ios;
23779
			sourceTree = "<group>";
23796
			sourceTree = "<group>";
23780
		};
23797
		};
23798
		AACC83D92316578600EB6BF5 /* MATHML */ = {
23799
			isa = PBXGroup;
23800
			children = (
23801
				AACC83DB2316583200EB6BF5 /* JSMathMLElement.cpp */,
23802
				AACC83DA231657EC00EB6BF5 /* JSMathMLElement.h */,
23803
				AA11C04D2316973D009D9831 /* JSMathMLMathElement.cpp */,
23804
				AA11C04E23169782009D9831 /* JSMathMLMathElement.h */,
23805
			);
23806
			name = MATHML;
23807
			sourceTree = "<group>";
23808
		};
23781
		B1A942DD15B5CE2200D525D1 /* mediasource */ = {
23809
		B1A942DD15B5CE2200D525D1 /* mediasource */ = {
23782
			isa = PBXGroup;
23810
			isa = PBXGroup;
23783
			children = (
23811
			children = (
Lines 27798-27807 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec9
27798
				FABE72EE1059C1EB00D888CC /* MathMLAnnotationElement.h */,
27826
				FABE72EE1059C1EB00D888CC /* MathMLAnnotationElement.h */,
27799
				FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */,
27827
				FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */,
27800
				FABE72EE1059C1EB00D999DD /* MathMLElement.h */,
27828
				FABE72EE1059C1EB00D999DD /* MathMLElement.h */,
27829
				AACC83D42316568700EB6BF5 /* MathMLElement.idl */,
27801
				0BCF83EF1059C1EB00D999DD /* MathMLFractionElement.cpp */,
27830
				0BCF83EF1059C1EB00D999DD /* MathMLFractionElement.cpp */,
27802
				0BCF83F01059C1EB00D999DD /* MathMLFractionElement.h */,
27831
				0BCF83F01059C1EB00D999DD /* MathMLFractionElement.h */,
27803
				FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
27832
				FABE72F11059C1EB00D999DD /* MathMLMathElement.cpp */,
27804
				FABE72F21059C1EB00D999DD /* MathMLMathElement.h */,
27833
				FABE72F21059C1EB00D999DD /* MathMLMathElement.h */,
27834
				AA11C04B23169689009D9831 /* MathMLMathElement.idl */,
27805
				C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */,
27835
				C3E61C653A64807A83E76FB8 /* MathMLMencloseElement.cpp */,
27806
				CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */,
27836
				CE6D89294C7AACE0AD89B3DD /* MathMLMencloseElement.h */,
27807
				D4F72C653A64807A83E76FB8 /* MathMLOperatorDictionary.cpp */,
27837
				D4F72C653A64807A83E76FB8 /* MathMLOperatorDictionary.cpp */,
- a/Source/WebCore/bindings/js/JSElementCustom.cpp +4 lines
Lines 36-43 a/Source/WebCore/bindings/js/JSElementCustom.cpp_sec1
36
#include "JSAttr.h"
36
#include "JSAttr.h"
37
#include "JSDOMBinding.h"
37
#include "JSDOMBinding.h"
38
#include "JSHTMLElementWrapperFactory.h"
38
#include "JSHTMLElementWrapperFactory.h"
39
#include "JSMathMLElementWrapperFactory.h"
39
#include "JSNodeList.h"
40
#include "JSNodeList.h"
40
#include "JSSVGElementWrapperFactory.h"
41
#include "JSSVGElementWrapperFactory.h"
42
#include "MathMLElement.h"
41
#include "NodeList.h"
43
#include "NodeList.h"
42
#include "SVGElement.h"
44
#include "SVGElement.h"
43
45
Lines 53-58 static JSValue createNewElementWrapper(JSDOMGlobalObject* globalObject, Ref<Elem a/Source/WebCore/bindings/js/JSElementCustom.cpp_sec2
53
        return createJSHTMLWrapper(globalObject, static_reference_cast<HTMLElement>(WTFMove(element)));
55
        return createJSHTMLWrapper(globalObject, static_reference_cast<HTMLElement>(WTFMove(element)));
54
    if (is<SVGElement>(element))
56
    if (is<SVGElement>(element))
55
        return createJSSVGWrapper(globalObject, static_reference_cast<SVGElement>(WTFMove(element)));
57
        return createJSSVGWrapper(globalObject, static_reference_cast<SVGElement>(WTFMove(element)));
58
    if (is<MathMLElement>(element))
59
        return createJSMathMLWrapper(globalObject, static_reference_cast<MathMLElement>(WTFMove(element)));
56
    return createWrapper<Element>(globalObject, WTFMove(element));
60
    return createWrapper<Element>(globalObject, WTFMove(element));
57
}
61
}
58
62
- a/Source/WebCore/bindings/js/JSNodeCustom.cpp +4 lines
Lines 51-60 a/Source/WebCore/bindings/js/JSNodeCustom.cpp_sec1
51
#include "JSEventListener.h"
51
#include "JSEventListener.h"
52
#include "JSHTMLElement.h"
52
#include "JSHTMLElement.h"
53
#include "JSHTMLElementWrapperFactory.h"
53
#include "JSHTMLElementWrapperFactory.h"
54
#include "JSMathMLElementWrapperFactory.h"
54
#include "JSProcessingInstruction.h"
55
#include "JSProcessingInstruction.h"
55
#include "JSSVGElementWrapperFactory.h"
56
#include "JSSVGElementWrapperFactory.h"
56
#include "JSShadowRoot.h"
57
#include "JSShadowRoot.h"
57
#include "JSText.h"
58
#include "JSText.h"
59
#include "MathMLElement.h"
58
#include "Node.h"
60
#include "Node.h"
59
#include "ProcessingInstruction.h"
61
#include "ProcessingInstruction.h"
60
#include "RegisteredEventListener.h"
62
#include "RegisteredEventListener.h"
Lines 150-155 static ALWAYS_INLINE JSValue createWrapperInline(ExecState* exec, JSDOMGlobalObj a/Source/WebCore/bindings/js/JSNodeCustom.cpp_sec2
150
                wrapper = createJSHTMLWrapper(globalObject, static_reference_cast<HTMLElement>(WTFMove(node)));
152
                wrapper = createJSHTMLWrapper(globalObject, static_reference_cast<HTMLElement>(WTFMove(node)));
151
            else if (is<SVGElement>(node))
153
            else if (is<SVGElement>(node))
152
                wrapper = createJSSVGWrapper(globalObject, static_reference_cast<SVGElement>(WTFMove(node)));
154
                wrapper = createJSSVGWrapper(globalObject, static_reference_cast<SVGElement>(WTFMove(node)));
155
            else if (is<MathMLElement>(node))
156
                wrapper = createJSMathMLWrapper(globalObject, static_reference_cast<MathMLElement>(WTFMove(node)));
153
            else
157
            else
154
                wrapper = createWrapper<Element>(globalObject, WTFMove(node));
158
                wrapper = createWrapper<Element>(globalObject, WTFMove(node));
155
            break;
159
            break;
- a/Source/WebCore/dom/StaticRange.h +1 lines
Lines 25-30 a/Source/WebCore/dom/StaticRange.h_sec1
25
25
26
#pragma once
26
#pragma once
27
27
28
#include "ExceptionOr.h"
28
#include <wtf/Ref.h>
29
#include <wtf/Ref.h>
29
#include <wtf/RefCounted.h>
30
#include <wtf/RefCounted.h>
30
31
- a/Source/WebCore/html/HTMLElement.idl -4 / +1 lines
Lines 29-42 a/Source/WebCore/html/HTMLElement.idl_sec1
29
    [CEReactions, Reflect] attribute DOMString lang;
29
    [CEReactions, Reflect] attribute DOMString lang;
30
    [CEReactions] attribute boolean translate;
30
    [CEReactions] attribute boolean translate;
31
    [CEReactions] attribute DOMString dir;
31
    [CEReactions] attribute DOMString dir;
32
    readonly attribute DOMStringMap dataset; // FIXME: Should be [SameObject].
33
32
34
    // User interaction.
33
    // User interaction.
35
    [CEReactions, Reflect] attribute boolean hidden;
34
    [CEReactions, Reflect] attribute boolean hidden;
36
    void click();
35
    void click();
37
    [CEReactions, ImplementedAs=tabIndexForBindings] attribute long tabIndex;
38
    void focus();
39
    void blur();
40
    [CEReactions, Reflect] attribute DOMString accessKey;
36
    [CEReactions, Reflect] attribute DOMString accessKey;
41
    // readonly attribute DOMString accessKeyLabel; // FIXME: Not supported.
37
    // readonly attribute DOMString accessKeyLabel; // FIXME: Not supported.
42
    [CEReactions] attribute boolean draggable;
38
    [CEReactions] attribute boolean draggable;
Lines 73-75 a/Source/WebCore/html/HTMLElement.idl_sec2
73
69
74
HTMLElement implements ElementCSSInlineStyle;
70
HTMLElement implements ElementCSSInlineStyle;
75
HTMLElement implements GlobalEventHandlers;
71
HTMLElement implements GlobalEventHandlers;
72
HTMLElement implements HTMLOrForeignElement;
- a/Source/WebCore/html/HTMLOrForeignElement.idl +35 lines
Line 0 a/Source/WebCore/html/HTMLOrForeignElement.idl_sec1
1
/*
2
 * Copyright (C) 2019 Igalia S.L. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
// https://html.spec.whatwg.org/multipage/dom.html#htmlorsvgelement
27
// https://github.com/whatwg/html/issues/4702
28
[
29
    NoInterfaceObject,
30
] interface HTMLOrForeignElement {
31
  readonly attribute DOMStringMap dataset; // FIXME: Should be [SameObject].
32
  [CEReactions, ImplementedAs=tabIndexForBindings] attribute long tabIndex;
33
  void focus();
34
  void blur();
35
};
- a/Source/WebCore/mathml/MathMLElement.cpp -4 / +28 lines
Lines 34-39 a/Source/WebCore/mathml/MathMLElement.cpp_sec1
34
#include "EventHandler.h"
34
#include "EventHandler.h"
35
#include "FrameLoader.h"
35
#include "FrameLoader.h"
36
#include "HTMLAnchorElement.h"
36
#include "HTMLAnchorElement.h"
37
#include "HTMLElement.h"
38
#include "HTMLNames.h"
37
#include "HTMLParserIdioms.h"
39
#include "HTMLParserIdioms.h"
38
#include "MathMLNames.h"
40
#include "MathMLNames.h"
39
#include "MouseEvent.h"
41
#include "MouseEvent.h"
Lines 81-94 void MathMLElement::parseAttribute(const QualifiedName& name, const AtomString& a/Source/WebCore/mathml/MathMLElement.cpp_sec2
81
        setIsLink(!value.isNull() && !shouldProhibitLinks(this));
83
        setIsLink(!value.isNull() && !shouldProhibitLinks(this));
82
        if (wasLink != isLink())
84
        if (wasLink != isLink())
83
            invalidateStyleForSubtree();
85
            invalidateStyleForSubtree();
84
    } else if (name == rowspanAttr) {
86
        return;
87
    }
88
89
    if (name == rowspanAttr) {
85
        if (is<RenderTableCell>(renderer()) && hasTagName(mtdTag))
90
        if (is<RenderTableCell>(renderer()) && hasTagName(mtdTag))
86
            downcast<RenderTableCell>(*renderer()).colSpanOrRowSpanChanged();
91
            downcast<RenderTableCell>(*renderer()).colSpanOrRowSpanChanged();
87
    } else if (name == columnspanAttr) {
92
        return;
93
    }
94
95
    if (name == columnspanAttr) {
88
        if (is<RenderTableCell>(renderer()) && hasTagName(mtdTag))
96
        if (is<RenderTableCell>(renderer()) && hasTagName(mtdTag))
89
            downcast<RenderTableCell>(renderer())->colSpanOrRowSpanChanged();
97
            downcast<RenderTableCell>(renderer())->colSpanOrRowSpanChanged();
90
    } else
98
        return;
91
        StyledElement::parseAttribute(name, value);
99
    }
100
101
    if (name == HTMLNames::tabindexAttr) {
102
        if (value.isEmpty())
103
            clearTabIndexExplicitlyIfNeeded();
104
        else if (auto optionalTabIndex = parseHTMLInteger(value))
105
            setTabIndexExplicitly(optionalTabIndex.value());
106
        return;
107
    }
108
109
    auto& eventName = HTMLElement::eventNameForEventHandlerAttribute(name);
110
    if (!eventName.isNull()) {
111
        setAttributeEventListener(eventName, name, value);
112
        return;
113
    }
114
115
    StyledElement::parseAttribute(name, value);
92
}
116
}
93
117
94
bool MathMLElement::isPresentationAttribute(const QualifiedName& name) const
118
bool MathMLElement::isPresentationAttribute(const QualifiedName& name) const
- a/Source/WebCore/mathml/MathMLElement.idl +33 lines
Line 0 a/Source/WebCore/mathml/MathMLElement.idl_sec1
1
/*
2
 * Copyright (C) 2019 Igalia S.L. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
[
27
    JSGenerateToNativeObject,
28
] interface MathMLElement : Element { };
29
30
MathMLElement implements ElementCSSInlineStyle;
31
MathMLElement implements GlobalEventHandlers;
32
MathMLElement implements DocumentAndElementEventHandlers;
33
MathMLElement implements HTMLOrForeignElement;
- a/Source/WebCore/mathml/MathMLMathElement.idl +26 lines
Line 0 a/Source/WebCore/mathml/MathMLMathElement.idl_sec1
1
/*
2
 * Copyright (C) 2019 Igalia S.L. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
interface MathMLMathElement : MathMLElement { };
- a/Source/WebCore/mathml/mathtags.in -43 / +44 lines
Lines 2-50 namespace="MathML" a/Source/WebCore/mathml/mathtags.in_sec1
2
namespaceURI="http://www.w3.org/1998/Math/MathML"
2
namespaceURI="http://www.w3.org/1998/Math/MathML"
3
guardFactoryWith="ENABLE(MATHML)"
3
guardFactoryWith="ENABLE(MATHML)"
4
fallbackInterfaceName="MathMLUnknownElement"
4
fallbackInterfaceName="MathMLUnknownElement"
5
fallbackJSInterfaceName="MathMLElement"
5
6
6
annotation interfaceName=MathMLAnnotationElement
7
annotation interfaceName=MathMLAnnotationElement, JSInterfaceName=MathMLElement
7
annotation-xml interfaceName=MathMLAnnotationElement
8
annotation-xml interfaceName=MathMLAnnotationElement, JSInterfaceName=MathMLElement
8
maction interfaceName=MathMLSelectElement
9
maction interfaceName=MathMLSelectElement, JSInterfaceName=MathMLElement
9
math
10
math
10
mfrac interfaceName=MathMLFractionElement
11
mfrac interfaceName=MathMLFractionElement, JSInterfaceName=MathMLElement
11
mfenced interfaceName=MathMLRowElement
12
mfenced interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
12
msubsup interfaceName=MathMLScriptsElement
13
msubsup interfaceName=MathMLScriptsElement, JSInterfaceName=MathMLElement
13
merror interfaceName=MathMLRowElement
14
merror interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
14
mpadded interfaceName=MathMLPaddedElement
15
mpadded interfaceName=MathMLPaddedElement, JSInterfaceName=MathMLElement
15
mphantom interfaceName=MathMLRowElement
16
mphantom interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
16
mrow interfaceName=MathMLRowElement
17
mrow interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
17
mstyle interfaceName=MathMLRowElement
18
mstyle interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
18
mover interfaceName=MathMLUnderOverElement
19
mover interfaceName=MathMLUnderOverElement, JSInterfaceName=MathMLElement
19
munder interfaceName=MathMLUnderOverElement
20
munder interfaceName=MathMLUnderOverElement, JSInterfaceName=MathMLElement
20
munderover interfaceName=MathMLUnderOverElement
21
munderover interfaceName=MathMLUnderOverElement, JSInterfaceName=MathMLElement
21
msqrt interfaceName=MathMLRootElement
22
msqrt interfaceName=MathMLRootElement, JSInterfaceName=MathMLElement
22
mroot interfaceName=MathMLRootElement
23
mroot interfaceName=MathMLRootElement, JSInterfaceName=MathMLElement
23
mi interfaceName=MathMLTokenElement
24
mi interfaceName=MathMLTokenElement, JSInterfaceName=MathMLElement
24
mn interfaceName=MathMLTokenElement
25
mn interfaceName=MathMLTokenElement, JSInterfaceName=MathMLElement
25
mo interfaceName=MathMLOperatorElement
26
mo interfaceName=MathMLOperatorElement, JSInterfaceName=MathMLElement
26
mtext interfaceName=MathMLTokenElement
27
mtext interfaceName=MathMLTokenElement, JSInterfaceName=MathMLElement
27
ms interfaceName=MathMLTokenElement
28
ms interfaceName=MathMLTokenElement, JSInterfaceName=MathMLElement
28
mspace interfaceName=MathMLSpaceElement
29
mspace interfaceName=MathMLSpaceElement, JSInterfaceName=MathMLElement
29
msub interfaceName=MathMLScriptsElement
30
msub interfaceName=MathMLScriptsElement, JSInterfaceName=MathMLElement
30
msup interfaceName=MathMLScriptsElement
31
msup interfaceName=MathMLScriptsElement, JSInterfaceName=MathMLElement
31
mtable interfaceName=MathMLPresentationElement
32
mtable interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
32
mtr interfaceName=MathMLPresentationElement
33
mtr interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
33
mtd interfaceName=MathMLPresentationElement
34
mtd interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
34
mmultiscripts interfaceName=MathMLScriptsElement
35
mmultiscripts interfaceName=MathMLScriptsElement, JSInterfaceName=MathMLElement
35
mprescripts interfaceName=MathMLPresentationElement
36
mprescripts interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
36
menclose interfaceName=MathMLMencloseElement
37
menclose interfaceName=MathMLMencloseElement, JSInterfaceName=MathMLElement
37
none interfaceName=MathMLPresentationElement
38
none interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
38
semantics interfaceName=MathMLSelectElement
39
semantics interfaceName=MathMLSelectElement, JSInterfaceName=MathMLElement
39
40
40
maligngroup interfaceName=MathMLPresentationElement
41
maligngroup interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
41
malignmark interfaceName=MathMLPresentationElement
42
malignmark interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
42
mglyph interfaceName=MathMLPresentationElement
43
mglyph interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
43
mlabeledtr interfaceName=MathMLPresentationElement
44
mlabeledtr interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
44
mlongdiv interfaceName=MathMLPresentationElement
45
mlongdiv interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
45
mscarries interfaceName=MathMLPresentationElement
46
mscarries interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
46
mscarry interfaceName=MathMLPresentationElement
47
mscarry interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
47
msgroup interfaceName=MathMLPresentationElement
48
msgroup interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
48
msline interfaceName=MathMLPresentationElement
49
msline interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
49
msrow interfaceName=MathMLPresentationElement
50
msrow interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
50
mstack interfaceName=MathMLPresentationElement
51
mstack interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
- a/Source/WebCore/svg/SVGElement.idl -7 / +1 lines
Lines 31-47 a/Source/WebCore/svg/SVGElement.idl_sec1
31
31
32
    readonly attribute SVGAnimatedString className;
32
    readonly attribute SVGAnimatedString className;
33
33
34
    [CEReactions=NotNeeded, ImplementedAs=tabIndexForBindings] attribute long tabIndex;
35
36
    // FIXME: Using "undefined" as default parameter value is wrong.
34
    // FIXME: Using "undefined" as default parameter value is wrong.
37
    // This method is deprecated, and we'd like to remove it someday.
35
    // This method is deprecated, and we'd like to remove it someday.
38
    DeprecatedCSSOMValue getPresentationAttribute(optional DOMString name = "undefined");
36
    DeprecatedCSSOMValue getPresentationAttribute(optional DOMString name = "undefined");
39
40
    void focus();
41
    void blur();
42
43
    readonly attribute DOMStringMap dataset;
44
};
37
};
45
38
46
SVGElement implements ElementCSSInlineStyle;
39
SVGElement implements ElementCSSInlineStyle;
47
SVGElement implements GlobalEventHandlers;
40
SVGElement implements GlobalEventHandlers;
41
SVGElement implements HTMLOrForeignElement;
- a/LayoutTests/ChangeLog +13 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2019-08-28  Rob Buis  <rbuis@igalia.com>
2
3
        Implement MathMLIDL / HTMLOrForeignElement
4
        https://bugs.webkit.org/show_bug.cgi?id=200470
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Adjust test expectations to new HTMLOrForeignElement interface.
9
10
        * js/dom/dom-static-property-for-in-iteration-expected.txt:
11
        * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
12
        * platform/mac/inspector/model/remote-object-dom-expected.txt:
13
1
2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
14
2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2
15
3
        SVG2: Add length, item getter and item setter to all SVG lists
16
        SVG2: Add length, item getter and item setter to all SVG lists
- a/LayoutTests/imported/w3c/ChangeLog +51 lines
Lines 1-3 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2019-08-28  Rob Buis  <rbuis@igalia.com>
2
3
        Implement MathMLIDL / HTMLOrForeignElement
4
        https://bugs.webkit.org/show_bug.cgi?id=200470
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add tests for functionality exposed by HTMLOrForeignElement.
9
10
        * web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt: Added.
11
        * web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html: Added.
12
        * web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative-expected.txt: Added.
13
        * web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html: Added.
14
        * web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative-expected.txt: Added.
15
        * web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html: Added.
16
        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: Added.
17
        * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html: Added.
18
        * web-platform-tests/mathml/relations/html5-tree/w3c-import.log:
19
        * web-platform-tests/mathml/support/attribute-values.js: Added.
20
        (AttributeValueTransforms.lowercase):
21
        (AttributeValueTransforms.uppercase):
22
        (AttributeValueTransforms.alternate_case):
23
        (TransformAttributeValues):
24
        * web-platform-tests/mathml/support/box-comparison.js: Added.
25
        (spaceBetween):
26
        (measureSpaceAround):
27
        (compareSpaceWithAndWithoutStyle):
28
        (compareSizeWithAndWithoutStyle):
29
        * web-platform-tests/mathml/support/feature-detection.js: Added.
30
        (MathMLFeatureDetection.has_mspace):
31
        (MathMLFeatureDetection.has_operator_spacing):
32
        (MathMLFeatureDetection.has_mfrac):
33
        (MathMLFeatureDetection.has_msqrt):
34
        (MathMLFeatureDetection.has_menclose):
35
        (MathMLFeatureDetection.has_dir):
36
        (MathMLFeatureDetection.ensure_for_match_reftest):
37
        * web-platform-tests/mathml/support/layout-comparison.js: Added.
38
        (getWritingMode):
39
        (compareSize):
40
        (participateToParentLayout):
41
        (childrenParticipatingToLayout):
42
        (compareLayout):
43
        * web-platform-tests/mathml/support/mathml-fragments.js: Added.
44
        (FragmentHelper.createElement):
45
        (FragmentHelper.isValidChildOfMrow):
46
        (FragmentHelper.isEmpty):
47
        (FragmentHelper.element):
48
        (FragmentHelper.appendChild):
49
        (FragmentHelper.forceNonEmptyElement):
50
        * web-platform-tests/mathml/support/w3c-import.log: Added.
51
1
2019-08-26  Chris Dumez  <cdumez@apple.com>
52
2019-08-26  Chris Dumez  <cdumez@apple.com>
2
53
3
        Change default value of window.open()'s url argument
54
        Change default value of window.open()'s url argument
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt +9 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt_sec1
1
2
PASS math.addEventListener for copy 
3
FAIL oncopy: the content attribute must be compiled into a function as the corresponding property assert_true: Calling the handler must run the code expected true got undefined
4
PASS math.addEventListener for cut 
5
FAIL oncut: the content attribute must be compiled into a function as the corresponding property assert_true: Calling the handler must run the code expected true got undefined
6
PASS math.addEventListener for paste 
7
FAIL onpaste: the content attribute must be compiled into a function as the corresponding property assert_true: Calling the handler must run the code expected true got undefined
8
E
9
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html +69 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html_sec1
1
<!DOCTYPE html>
2
<title>DocumentAndElementEventHandlers / clipboard events for MathML</title>
3
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dom-and-javascript"/>
4
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#documentandelementeventhandlers"/>
5
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-copy"/>
6
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-cut"/>
7
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-paste"/>
8
<meta
9
  name="assert"
10
  content="MathMLElements incorporate a functional DocumentAndElementEventHandlers interface"
11
/>
12
13
<script src="/resources/testharness.js"></script>
14
<script src="/resources/testharnessreport.js"></script>
15
<div id="log"></div>
16
<math
17
  oncopy="document.copyHappened = true"
18
  oncut="document.cutHappened = true"
19
  onpaste="document.pasteHappened = true"
20
>
21
  <mi>E</mi>
22
</math>
23
<script>
24
  const EVENTS = ["copy", "cut", "paste"];
25
  const el = document.querySelector("math");
26
27
  function addEventListenerTest(name) {
28
    async_test(test => {
29
      el.addEventListener(
30
        name,
31
        test.step_func_done(e => {
32
          assert_true(
33
            true,
34
            "MathML Elements should be able to receive ${name} events"
35
          );
36
        })
37
      );
38
      const event = new ClipboardEvent(name, {
39
        bubbles: true,
40
        cancellable: true
41
      });
42
      el.dispatchEvent(event);
43
    }, `math.addEventListener for ${name}`);
44
  }
45
46
  function evaluatedHandlerTest(name) {
47
    const handlerName = "on" + name;
48
49
    test(() => {
50
      const compiledHandler = el[handlerName];
51
52
      assert_equals(
53
        typeof compiledHandler,
54
        "function",
55
        `The ${handlerName} property must be a function`
56
      );
57
      compiledHandler();
58
      assert_true(
59
        window[name + "Happened"],
60
        "Calling the handler must run the code"
61
      );
62
    }, `${handlerName}: the content attribute must be compiled into a function as the corresponding property`);
63
  }
64
65
  EVENTS.forEach(name => {
66
    addEventListenerTest(name);
67
    evaluatedHandlerTest(name);
68
  });
69
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative-expected.txt +35 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative-expected.txt_sec1
1
This tests the presence and functionality of features of the `ElementCSSInlineStyle` interface for MathMLElements 
2
3
PASS The <math> element style property should be present and be functional. 
4
PASS The annotation's style property should be present and be functional. 
5
PASS The annotation-xml's style property should be present and be functional. 
6
PASS The maction's style property should be present and be functional. 
7
PASS The menclose's style property should be present and be functional. 
8
PASS The merror's style property should be present and be functional. 
9
PASS The mfrac's style property should be present and be functional. 
10
PASS The mi's style property should be present and be functional. 
11
PASS The mmultiscripts's style property should be present and be functional. 
12
PASS The mn's style property should be present and be functional. 
13
PASS The mo's style property should be present and be functional. 
14
PASS The mover's style property should be present and be functional. 
15
PASS The mpadded's style property should be present and be functional. 
16
PASS The mphantom's style property should be present and be functional. 
17
PASS The mprescripts's style property should be present and be functional. 
18
PASS The mroot's style property should be present and be functional. 
19
PASS The mrow's style property should be present and be functional. 
20
PASS The ms's style property should be present and be functional. 
21
PASS The mspace's style property should be present and be functional. 
22
PASS The msqrt's style property should be present and be functional. 
23
PASS The mstyle's style property should be present and be functional. 
24
PASS The msub's style property should be present and be functional. 
25
PASS The msubsup's style property should be present and be functional. 
26
PASS The msup's style property should be present and be functional. 
27
PASS The mtable's style property should be present and be functional. 
28
PASS The mtd's style property should be present and be functional. 
29
PASS The mtext's style property should be present and be functional. 
30
PASS The mtr's style property should be present and be functional. 
31
PASS The munder's style property should be present and be functional. 
32
PASS The munderover's style property should be present and be functional. 
33
PASS The none's style property should be present and be functional. 
34
PASS The semantics's style property should be present and be functional. 
35
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html +54 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html_sec1
1
<!DOCTYPE html>
2
<html>
3
  <head>
4
    <meta charset="utf-8" />
5
    <title>MathML 'ElementCSSInlineStyle` Mixin Tests</title>
6
    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dom-and-javascript"/>
7
    <style>
8
      math * {
9
        background-color: red;
10
      }
11
    </style>
12
    <meta
13
      name="assert"
14
      content="MathMLElements incorporate a functional ElementCSSInlineStyle interface"
15
    />
16
    <script src="/mathml/support/mathml-fragments.js"></script>
17
    <script src="/resources/testharness.js"></script>
18
    <script src="/resources/testharnessreport.js"></script>
19
  </head>
20
  <body>
21
    <span
22
      >This tests the presence and functionality of features of the
23
      `ElementCSSInlineStyle` interface for MathMLElements</span
24
    >
25
    <math></math>
26
    <script>
27
      let mathEl = document.querySelector("math");
28
29
      test(function() {
30
        mathEl.style.backgroundColor = "lime";
31
        assert_equals(
32
          getComputedStyle(mathEl).backgroundColor,
33
          "rgb(0, 255, 0)",
34
          "The applied background should be green."
35
        );
36
      }, `The <math> element style property should be present and be functional.`);
37
38
      Object.keys(MathMLFragments).forEach(elName => {
39
        mathEl.innerHTML = MathMLFragments[elName];
40
41
        test(function() {
42
          let el = FragmentHelper.element(mathEl);
43
          el.style.backgroundColor = "blue";
44
45
          assert_equals(
46
            getComputedStyle(el).backgroundColor,
47
            "rgb(0, 0, 255)",
48
            "The applied background should be blue."
49
          );
50
        }, `The ${elName}'s style property should be present and be functional.`);
51
      });
52
    </script>
53
  </body>
54
</html>
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative-expected.txt +9 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative-expected.txt_sec1
1
This tests the presence and functionality of features of `HTMLOrForeignElement` (currently `HTMLOrSVGElement`) 
2
E
3
4
PASS MathML elements should have a .dataset 
5
PASS The dataset property should be present and be functional. 
6
PASS MathML elements should have a tabIndex property 
7
PASS MathML elements should work with focus predictably 
8
PASS MathML elements should work with blur predictably 
9
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html +111 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html_sec1
1
<!DOCTYPE html>
2
<html>
3
  <head>
4
    <meta charset="utf-8" />
5
    <title>MathML 'HTMLOrForeignElement` Mixin Tests</title>
6
    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dom-and-javascript"/>
7
    <style>
8
      mi {
9
        background-color: red;
10
      }
11
      :focus {
12
        background-color: rgb(0, 255, 0);
13
      }
14
    </style>
15
    <meta
16
      name="assert"
17
      content="MathMLElements incorporate a functional HTMLOrForeignElement interface"
18
    />
19
    <script src="/resources/testharness.js"></script>
20
    <script src="/resources/testharnessreport.js"></script>
21
  </head>
22
  <body tabindex="-1">
23
    <span tabindex="-1"
24
      >This tests the presence and functionality of features of
25
      `HTMLOrForeignElement` (currently `HTMLOrSVGElement`)</span
26
    >
27
    <math tabindex="-1">
28
      <mi>E</mi>
29
    </math>
30
  </body>
31
  <script>
32
    // spot check the functionality of several interfaces
33
    let el = document.querySelector("mi");
34
    let mathEl = document.querySelector("math");
35
36
    // this really belongs in
37
    // https://github.com/web-platform-tests/wpt/blob/master/html/dom/elements/global-attributes/dataset.html
38
    // it is here tentatively
39
    test(function() {
40
      var mathml = document.createElementNS(
41
        "http://www.w3.org/1998/Math/MathML",
42
        "math"
43
      );
44
      assert_true(mathml.dataset instanceof DOMStringMap);
45
    }, "MathML elements should have a .dataset");
46
47
    // exercise some basic tests on .dataset
48
    test(function() {
49
      assert_equals(
50
        Object.keys(el.dataset).toString(),
51
        "",
52
        "The .dataset property should be present"
53
      );
54
55
      el.setAttribute("data-one", "x");
56
      el.setAttribute("data-two", "y");
57
58
      assert_equals(
59
        el.dataset.one,
60
        "x",
61
        '.one should be "x" after setting the data-one attribute'
62
      );
63
      assert_equals(
64
        el.dataset.two,
65
        "y",
66
        '.one should be "y" after setting the data-two attribute'
67
      );
68
69
      el.dataset.one = "o";
70
      assert_equals(
71
        el.getAttribute("data-one"),
72
        "o",
73
        'the data-one attribute should reflect a change to dataset.one and contain "o"'
74
      );
75
    }, "The dataset property should be present and be functional.");
76
77
    test(function() {
78
      assert_equals(mathEl.tabIndex, -1);
79
    }, "MathML elements should have a tabIndex property");
80
81
    promise_test(function() {
82
      function focus() {
83
        mathEl.focus();
84
        return Promise.resolve();
85
      }
86
87
      return focus().then(() => {
88
        assert_equals(
89
          getComputedStyle(mathEl).backgroundColor,
90
          "rgb(0, 255, 0)",
91
          "MathML elements with tabindex=-1 should be programmatically focusable and apply :focus"
92
        );
93
      });
94
    }, "MathML elements should work with focus predictably");
95
96
    promise_test(function() {
97
      function blur() {
98
        mathEl.blur();
99
        return Promise.resolve();
100
      }
101
102
      return blur().then(() => {
103
        assert_equals(
104
          getComputedStyle(mathEl).backgroundColor,
105
          "rgba(0, 0, 0, 0)",
106
          "MathML elements with tabindex=-1 be programmatically blur() able"
107
        );
108
      });
109
    }, "MathML elements should work with blur predictably");
110
  </script>
111
</html>
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt +246 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt_sec1
1
2
PASS onabort: must be on the appropriate locations for GlobalEventHandlers 
3
PASS onabort: the default value must be null 
4
PASS onabort: the content attribute must be compiled into a function as the corresponding property 
5
PASS onabort: dispatching an Event at a <math> element must trigger element.onabort 
6
FAIL onauxclick: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onauxclick" expected true got false
7
FAIL onauxclick: the default value must be null assert_equals: The default value of the property is null for a MathMLElement instance expected (object) null but got (undefined) undefined
8
FAIL onauxclick: the content attribute must be compiled into a function as the corresponding property assert_equals: The onauxclick property must be a function expected "function" but got "undefined"
9
PASS onauxclick: dispatching an Event at a <math> element must trigger element.onauxclick 
10
PASS onblur: must be on the appropriate locations for GlobalEventHandlers 
11
PASS onblur: the default value must be null 
12
PASS onblur: the content attribute must be compiled into a function as the corresponding property 
13
PASS onblur: dispatching an Event at a <math> element must trigger element.onblur 
14
FAIL oncancel: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "oncancel" expected true got false
15
FAIL oncancel: the default value must be null assert_equals: The default value of the property is null for a MathMLElement instance expected (object) null but got (undefined) undefined
16
FAIL oncancel: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncancel property must be a function expected "function" but got "undefined"
17
PASS oncancel: dispatching an Event at a <math> element must trigger element.oncancel 
18
PASS oncanplay: must be on the appropriate locations for GlobalEventHandlers 
19
PASS oncanplay: the default value must be null 
20
PASS oncanplay: the content attribute must be compiled into a function as the corresponding property 
21
PASS oncanplay: dispatching an Event at a <math> element must trigger element.oncanplay 
22
PASS oncanplaythrough: must be on the appropriate locations for GlobalEventHandlers 
23
PASS oncanplaythrough: the default value must be null 
24
PASS oncanplaythrough: the content attribute must be compiled into a function as the corresponding property 
25
PASS oncanplaythrough: dispatching an Event at a <math> element must trigger element.oncanplaythrough 
26
PASS onchange: must be on the appropriate locations for GlobalEventHandlers 
27
PASS onchange: the default value must be null 
28
PASS onchange: the content attribute must be compiled into a function as the corresponding property 
29
PASS onchange: dispatching an Event at a <math> element must trigger element.onchange 
30
PASS onclick: must be on the appropriate locations for GlobalEventHandlers 
31
PASS onclick: the default value must be null 
32
PASS onclick: the content attribute must be compiled into a function as the corresponding property 
33
PASS onclick: dispatching an Event at a <math> element must trigger element.onclick 
34
FAIL onclose: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onclose" expected true got false
35
FAIL onclose: the default value must be null assert_equals: The default value of the property is null for a MathMLElement instance expected (object) null but got (undefined) undefined
36
FAIL onclose: the content attribute must be compiled into a function as the corresponding property assert_equals: The onclose property must be a function expected "function" but got "undefined"
37
PASS onclose: dispatching an Event at a <math> element must trigger element.onclose 
38
PASS oncontextmenu: must be on the appropriate locations for GlobalEventHandlers 
39
PASS oncontextmenu: the default value must be null 
40
PASS oncontextmenu: the content attribute must be compiled into a function as the corresponding property 
41
PASS oncontextmenu: dispatching an Event at a <math> element must trigger element.oncontextmenu 
42
PASS oncuechange: must be on the appropriate locations for GlobalEventHandlers 
43
PASS oncuechange: the default value must be null 
44
FAIL oncuechange: the content attribute must be compiled into a function as the corresponding property assert_equals: The oncuechange property must be a function expected "function" but got "object"
45
PASS oncuechange: dispatching an Event at a <math> element must trigger element.oncuechange 
46
PASS ondblclick: must be on the appropriate locations for GlobalEventHandlers 
47
PASS ondblclick: the default value must be null 
48
PASS ondblclick: the content attribute must be compiled into a function as the corresponding property 
49
PASS ondblclick: dispatching an Event at a <math> element must trigger element.ondblclick 
50
PASS ondrag: must be on the appropriate locations for GlobalEventHandlers 
51
PASS ondrag: the default value must be null 
52
PASS ondrag: the content attribute must be compiled into a function as the corresponding property 
53
PASS ondrag: dispatching an Event at a <math> element must trigger element.ondrag 
54
PASS ondragend: must be on the appropriate locations for GlobalEventHandlers 
55
PASS ondragend: the default value must be null 
56
PASS ondragend: the content attribute must be compiled into a function as the corresponding property 
57
PASS ondragend: dispatching an Event at a <math> element must trigger element.ondragend 
58
PASS ondragenter: must be on the appropriate locations for GlobalEventHandlers 
59
PASS ondragenter: the default value must be null 
60
PASS ondragenter: the content attribute must be compiled into a function as the corresponding property 
61
PASS ondragenter: dispatching an Event at a <math> element must trigger element.ondragenter 
62
FAIL ondragexit: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "ondragexit" expected true got false
63
FAIL ondragexit: the default value must be null assert_equals: The default value of the property is null for a MathMLElement instance expected (object) null but got (undefined) undefined
64
FAIL ondragexit: the content attribute must be compiled into a function as the corresponding property assert_equals: The ondragexit property must be a function expected "function" but got "undefined"
65
PASS ondragexit: dispatching an Event at a <math> element must trigger element.ondragexit 
66
PASS ondragleave: must be on the appropriate locations for GlobalEventHandlers 
67
PASS ondragleave: the default value must be null 
68
PASS ondragleave: the content attribute must be compiled into a function as the corresponding property 
69
PASS ondragleave: dispatching an Event at a <math> element must trigger element.ondragleave 
70
PASS ondragover: must be on the appropriate locations for GlobalEventHandlers 
71
PASS ondragover: the default value must be null 
72
PASS ondragover: the content attribute must be compiled into a function as the corresponding property 
73
PASS ondragover: dispatching an Event at a <math> element must trigger element.ondragover 
74
PASS ondragstart: must be on the appropriate locations for GlobalEventHandlers 
75
PASS ondragstart: the default value must be null 
76
PASS ondragstart: the content attribute must be compiled into a function as the corresponding property 
77
PASS ondragstart: dispatching an Event at a <math> element must trigger element.ondragstart 
78
PASS ondrop: must be on the appropriate locations for GlobalEventHandlers 
79
PASS ondrop: the default value must be null 
80
PASS ondrop: the content attribute must be compiled into a function as the corresponding property 
81
PASS ondrop: dispatching an Event at a <math> element must trigger element.ondrop 
82
PASS ondurationchange: must be on the appropriate locations for GlobalEventHandlers 
83
PASS ondurationchange: the default value must be null 
84
PASS ondurationchange: the content attribute must be compiled into a function as the corresponding property 
85
PASS ondurationchange: dispatching an Event at a <math> element must trigger element.ondurationchange 
86
PASS onemptied: must be on the appropriate locations for GlobalEventHandlers 
87
PASS onemptied: the default value must be null 
88
PASS onemptied: the content attribute must be compiled into a function as the corresponding property 
89
PASS onemptied: dispatching an Event at a <math> element must trigger element.onemptied 
90
PASS onended: must be on the appropriate locations for GlobalEventHandlers 
91
PASS onended: the default value must be null 
92
PASS onended: the content attribute must be compiled into a function as the corresponding property 
93
PASS onended: dispatching an Event at a <math> element must trigger element.onended 
94
PASS onfocus: must be on the appropriate locations for GlobalEventHandlers 
95
PASS onfocus: the default value must be null 
96
PASS onfocus: the content attribute must be compiled into a function as the corresponding property 
97
PASS onfocus: dispatching an Event at a <math> element must trigger element.onfocus 
98
PASS oninput: must be on the appropriate locations for GlobalEventHandlers 
99
PASS oninput: the default value must be null 
100
PASS oninput: the content attribute must be compiled into a function as the corresponding property 
101
PASS oninput: dispatching an Event at a <math> element must trigger element.oninput 
102
PASS oninvalid: must be on the appropriate locations for GlobalEventHandlers 
103
PASS oninvalid: the default value must be null 
104
PASS oninvalid: the content attribute must be compiled into a function as the corresponding property 
105
PASS oninvalid: dispatching an Event at a <math> element must trigger element.oninvalid 
106
PASS onkeydown: must be on the appropriate locations for GlobalEventHandlers 
107
PASS onkeydown: the default value must be null 
108
PASS onkeydown: the content attribute must be compiled into a function as the corresponding property 
109
PASS onkeydown: dispatching an Event at a <math> element must trigger element.onkeydown 
110
PASS onkeypress: must be on the appropriate locations for GlobalEventHandlers 
111
PASS onkeypress: the default value must be null 
112
PASS onkeypress: the content attribute must be compiled into a function as the corresponding property 
113
PASS onkeypress: dispatching an Event at a <math> element must trigger element.onkeypress 
114
PASS onkeyup: must be on the appropriate locations for GlobalEventHandlers 
115
PASS onkeyup: the default value must be null 
116
PASS onkeyup: the content attribute must be compiled into a function as the corresponding property 
117
PASS onkeyup: dispatching an Event at a <math> element must trigger element.onkeyup 
118
PASS onload: must be on the appropriate locations for GlobalEventHandlers 
119
PASS onload: the default value must be null 
120
PASS onload: the content attribute must be compiled into a function as the corresponding property 
121
PASS onload: dispatching an Event at a <math> element must trigger element.onload 
122
PASS onloadeddata: must be on the appropriate locations for GlobalEventHandlers 
123
PASS onloadeddata: the default value must be null 
124
PASS onloadeddata: the content attribute must be compiled into a function as the corresponding property 
125
PASS onloadeddata: dispatching an Event at a <math> element must trigger element.onloadeddata 
126
PASS onloadedmetadata: must be on the appropriate locations for GlobalEventHandlers 
127
PASS onloadedmetadata: the default value must be null 
128
PASS onloadedmetadata: the content attribute must be compiled into a function as the corresponding property 
129
PASS onloadedmetadata: dispatching an Event at a <math> element must trigger element.onloadedmetadata 
130
FAIL onloadend: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onloadend" expected true got false
131
FAIL onloadend: the default value must be null assert_equals: The default value of the property is null for a MathMLElement instance expected (object) null but got (undefined) undefined
132
FAIL onloadend: the content attribute must be compiled into a function as the corresponding property assert_equals: The onloadend property must be a function expected "function" but got "undefined"
133
PASS onloadend: dispatching an Event at a <math> element must trigger element.onloadend 
134
PASS onloadstart: must be on the appropriate locations for GlobalEventHandlers 
135
PASS onloadstart: the default value must be null 
136
PASS onloadstart: the content attribute must be compiled into a function as the corresponding property 
137
PASS onloadstart: dispatching an Event at a <math> element must trigger element.onloadstart 
138
PASS onmousedown: must be on the appropriate locations for GlobalEventHandlers 
139
PASS onmousedown: the default value must be null 
140
PASS onmousedown: the content attribute must be compiled into a function as the corresponding property 
141
PASS onmousedown: dispatching an Event at a <math> element must trigger element.onmousedown 
142
PASS onmouseenter: must be on the appropriate locations for GlobalEventHandlers 
143
PASS onmouseenter: the default value must be null 
144
PASS onmouseenter: the content attribute must be compiled into a function as the corresponding property 
145
PASS onmouseenter: dispatching an Event at a <math> element must trigger element.onmouseenter 
146
PASS onmouseleave: must be on the appropriate locations for GlobalEventHandlers 
147
PASS onmouseleave: the default value must be null 
148
PASS onmouseleave: the content attribute must be compiled into a function as the corresponding property 
149
PASS onmouseleave: dispatching an Event at a <math> element must trigger element.onmouseleave 
150
PASS onmousemove: must be on the appropriate locations for GlobalEventHandlers 
151
PASS onmousemove: the default value must be null 
152
PASS onmousemove: the content attribute must be compiled into a function as the corresponding property 
153
PASS onmousemove: dispatching an Event at a <math> element must trigger element.onmousemove 
154
PASS onmouseout: must be on the appropriate locations for GlobalEventHandlers 
155
PASS onmouseout: the default value must be null 
156
PASS onmouseout: the content attribute must be compiled into a function as the corresponding property 
157
PASS onmouseout: dispatching an Event at a <math> element must trigger element.onmouseout 
158
PASS onmouseover: must be on the appropriate locations for GlobalEventHandlers 
159
PASS onmouseover: the default value must be null 
160
PASS onmouseover: the content attribute must be compiled into a function as the corresponding property 
161
PASS onmouseover: dispatching an Event at a <math> element must trigger element.onmouseover 
162
PASS onmouseup: must be on the appropriate locations for GlobalEventHandlers 
163
PASS onmouseup: the default value must be null 
164
PASS onmouseup: the content attribute must be compiled into a function as the corresponding property 
165
PASS onmouseup: dispatching an Event at a <math> element must trigger element.onmouseup 
166
PASS onwheel: must be on the appropriate locations for GlobalEventHandlers 
167
PASS onwheel: the default value must be null 
168
PASS onwheel: the content attribute must be compiled into a function as the corresponding property 
169
PASS onwheel: dispatching an Event at a <math> element must trigger element.onwheel 
170
PASS onpause: must be on the appropriate locations for GlobalEventHandlers 
171
PASS onpause: the default value must be null 
172
PASS onpause: the content attribute must be compiled into a function as the corresponding property 
173
PASS onpause: dispatching an Event at a <math> element must trigger element.onpause 
174
PASS onplay: must be on the appropriate locations for GlobalEventHandlers 
175
PASS onplay: the default value must be null 
176
PASS onplay: the content attribute must be compiled into a function as the corresponding property 
177
PASS onplay: dispatching an Event at a <math> element must trigger element.onplay 
178
PASS onplaying: must be on the appropriate locations for GlobalEventHandlers 
179
PASS onplaying: the default value must be null 
180
PASS onplaying: the content attribute must be compiled into a function as the corresponding property 
181
PASS onplaying: dispatching an Event at a <math> element must trigger element.onplaying 
182
PASS onprogress: must be on the appropriate locations for GlobalEventHandlers 
183
PASS onprogress: the default value must be null 
184
PASS onprogress: the content attribute must be compiled into a function as the corresponding property 
185
PASS onprogress: dispatching an Event at a <math> element must trigger element.onprogress 
186
PASS onratechange: must be on the appropriate locations for GlobalEventHandlers 
187
PASS onratechange: the default value must be null 
188
PASS onratechange: the content attribute must be compiled into a function as the corresponding property 
189
PASS onratechange: dispatching an Event at a <math> element must trigger element.onratechange 
190
PASS onreset: must be on the appropriate locations for GlobalEventHandlers 
191
PASS onreset: the default value must be null 
192
PASS onreset: the content attribute must be compiled into a function as the corresponding property 
193
PASS onreset: dispatching an Event at a <math> element must trigger element.onreset 
194
PASS onresize: must be on the appropriate locations for GlobalEventHandlers 
195
PASS onresize: the default value must be null 
196
PASS onresize: the content attribute must be compiled into a function as the corresponding property 
197
PASS onresize: dispatching an Event at a <math> element must trigger element.onresize 
198
PASS onscroll: must be on the appropriate locations for GlobalEventHandlers 
199
PASS onscroll: the default value must be null 
200
PASS onscroll: the content attribute must be compiled into a function as the corresponding property 
201
PASS onscroll: dispatching an Event at a <math> element must trigger element.onscroll 
202
FAIL onsecuritypolicyviolation: must be on the appropriate locations for GlobalEventHandlers assert_true: MathMLElement has an own property named "onsecuritypolicyviolation" expected true got false
203
FAIL onsecuritypolicyviolation: the default value must be null assert_equals: The default value of the property is null for a MathMLElement instance expected (object) null but got (undefined) undefined
204
FAIL onsecuritypolicyviolation: the content attribute must be compiled into a function as the corresponding property assert_equals: The onsecuritypolicyviolation property must be a function expected "function" but got "undefined"
205
PASS onsecuritypolicyviolation: dispatching an Event at a <math> element must trigger element.onsecuritypolicyviolation 
206
PASS onseeked: must be on the appropriate locations for GlobalEventHandlers 
207
PASS onseeked: the default value must be null 
208
PASS onseeked: the content attribute must be compiled into a function as the corresponding property 
209
PASS onseeked: dispatching an Event at a <math> element must trigger element.onseeked 
210
PASS onseeking: must be on the appropriate locations for GlobalEventHandlers 
211
PASS onseeking: the default value must be null 
212
PASS onseeking: the content attribute must be compiled into a function as the corresponding property 
213
PASS onseeking: dispatching an Event at a <math> element must trigger element.onseeking 
214
PASS onselect: must be on the appropriate locations for GlobalEventHandlers 
215
PASS onselect: the default value must be null 
216
PASS onselect: the content attribute must be compiled into a function as the corresponding property 
217
PASS onselect: dispatching an Event at a <math> element must trigger element.onselect 
218
PASS onstalled: must be on the appropriate locations for GlobalEventHandlers 
219
PASS onstalled: the default value must be null 
220
PASS onstalled: the content attribute must be compiled into a function as the corresponding property 
221
PASS onstalled: dispatching an Event at a <math> element must trigger element.onstalled 
222
PASS onsubmit: must be on the appropriate locations for GlobalEventHandlers 
223
PASS onsubmit: the default value must be null 
224
PASS onsubmit: the content attribute must be compiled into a function as the corresponding property 
225
PASS onsubmit: dispatching an Event at a <math> element must trigger element.onsubmit 
226
PASS onsuspend: must be on the appropriate locations for GlobalEventHandlers 
227
PASS onsuspend: the default value must be null 
228
PASS onsuspend: the content attribute must be compiled into a function as the corresponding property 
229
PASS onsuspend: dispatching an Event at a <math> element must trigger element.onsuspend 
230
PASS ontimeupdate: must be on the appropriate locations for GlobalEventHandlers 
231
PASS ontimeupdate: the default value must be null 
232
PASS ontimeupdate: the content attribute must be compiled into a function as the corresponding property 
233
PASS ontimeupdate: dispatching an Event at a <math> element must trigger element.ontimeupdate 
234
PASS ontoggle: must be on the appropriate locations for GlobalEventHandlers 
235
PASS ontoggle: the default value must be null 
236
PASS ontoggle: the content attribute must be compiled into a function as the corresponding property 
237
PASS ontoggle: dispatching an Event at a <math> element must trigger element.ontoggle 
238
PASS onvolumechange: must be on the appropriate locations for GlobalEventHandlers 
239
PASS onvolumechange: the default value must be null 
240
PASS onvolumechange: the content attribute must be compiled into a function as the corresponding property 
241
PASS onvolumechange: dispatching an Event at a <math> element must trigger element.onvolumechange 
242
PASS onwaiting: must be on the appropriate locations for GlobalEventHandlers 
243
PASS onwaiting: the default value must be null 
244
PASS onwaiting: the content attribute must be compiled into a function as the corresponding property 
245
PASS onwaiting: dispatching an Event at a <math> element must trigger element.onwaiting 
246
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html +99 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html_sec1
1
<!DOCTYPE html>
2
<title>MathMLElement GlobalEventHandlers</title>
3
<link rel="author" title="Brian Kardell" href="mailto:bkardell@igalia.com" />
4
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dom-and-javascript"/>
5
<link rel="help" href="https://html.spec.whatwg.org/multipage/#event-handler-idl-attributes"/>
6
<link rel="help" href="https://html.spec.whatwg.org/multipage/#event-handler-content-attributes"/>
7
<script src="/resources/testharness.js"></script>
8
<script src="/resources/testharnessreport.js"></script>
9
<script src="/resources/WebIDLParser.js"></script>
10
11
<script>
12
  "use strict";
13
  setup({ explicit_done: true });
14
15
  // basic pattern lifted from /html/webappapis/scripting/events/event-handler-all-global-events.html
16
  fetch("/interfaces/html.idl")
17
    .then(res => res.text())
18
    .then(htmlIDL => {
19
      const parsedHTMLIDL = WebIDL2.parse(htmlIDL);
20
      const globalEventHandlers = parsedHTMLIDL.find(
21
        idl => idl.name === "GlobalEventHandlers"
22
      );
23
24
      // onerror is too special
25
      const names = globalEventHandlers.members
26
        .map(member => member.name)
27
        .filter(name => name !== "onerror");
28
29
      for (const name of names) {
30
        const withoutOn = name.substring(2);
31
32
        test(() => {
33
          const location = MathMLElement.prototype;
34
          assert_true(
35
            location.hasOwnProperty(name),
36
            `${location.constructor.name} has an own property named "${name}"`
37
          );
38
39
          assert_false(
40
            name in Element.prototype,
41
            `Element.prototype must not contain a "${name}" property`
42
          );
43
        }, `${name}: must be on the appropriate locations for GlobalEventHandlers`);
44
45
        test(() => {
46
          const location = document.createElementNS(
47
            "http://www.w3.org/1998/Math/MathML",
48
            "math"
49
          );
50
51
          assert_equals(
52
            location[name],
53
            null,
54
            `The default value of the property is null for a ${
55
              location.constructor.name
56
            } instance`
57
          );
58
        }, `${name}: the default value must be null`);
59
60
        test(() => {
61
          const el = document.createElementNS(
62
            "http://www.w3.org/1998/Math/MathML",
63
            "math"
64
          );
65
          el.setAttribute(name, `window.${name}Happened = true;`);
66
          const compiledHandler = el[name];
67
68
          assert_equals(
69
            typeof compiledHandler,
70
            "function",
71
            `The ${name} property must be a function`
72
          );
73
          compiledHandler();
74
          assert_true(
75
            window[name + "Happened"],
76
            "Calling the handler must run the code"
77
          );
78
        }, `${name}: the content attribute must be compiled into a function as the corresponding property`);
79
80
        test(() => {
81
          const element = document.createElementNS(
82
            "http://www.w3.org/1998/Math/MathML",
83
            "math"
84
          );
85
          element[name] = e => {
86
            assert_equals(
87
              e.currentTarget,
88
              element,
89
              "The event must be fired at the <math> element"
90
            );
91
          };
92
93
          element.dispatchEvent(new Event(withoutOn));
94
        }, `${name}: dispatching an Event at a <math> element must trigger element.${name}`);
95
      }
96
97
      done();
98
    });
99
</script>
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/w3c-import.log +4 lines
Lines 17-24 List of files: a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/w3c-import.log_sec1
17
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/class-1-expected.html
17
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/class-1-expected.html
18
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/class-1.html
18
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/class-1.html
19
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/class-2.html
19
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/class-2.html
20
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html
20
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/color-attributes-1-expected.html
21
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/color-attributes-1-expected.html
21
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/color-attributes-1.html
22
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/color-attributes-1.html
23
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html
22
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-1.html
24
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-1.html
23
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-1-expected.html
25
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-1-expected.html
24
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-1.html
26
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-1.html
Lines 27-32 List of files: a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/w3c-import.log_sec2
27
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-2-expected.html
29
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-2-expected.html
28
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-2.html
30
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-2.html
29
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-3.html
31
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/href-click-3.html
32
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html
30
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-1-expected.html
33
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-1-expected.html
31
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-1.html
34
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-1.html
32
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-2-expected.html
35
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-2-expected.html
Lines 34-39 List of files: a/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/w3c-import.log_sec3
34
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-3-expected.html
37
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-3-expected.html
35
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-3.html
38
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-3.html
36
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/required-extensions-1.html
39
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/required-extensions-1.html
40
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html
37
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/required-extensions-2-expected.html
41
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/required-extensions-2-expected.html
38
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/required-extensions-2.html
42
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/required-extensions-2.html
39
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/unique-identifier-1-expected.html
43
/LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/unique-identifier-1-expected.html
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/attribute-values.js +31 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/attribute-values.js_sec1
1
AttributeValueTransforms = {
2
    lowercase: function(value) { return value.toLowerCase(); },
3
    uppercase: function(value) { return value.toUpperCase(); },
4
    alternate_case: function(value) {
5
        var transformedValue = "";
6
        for (var i = 0; i < value.length; i++) {
7
            transformedValue += i % 2 ?
8
                value.charAt(i).toLowerCase() :
9
                value.charAt(i).toUpperCase();
10
        }
11
        return transformedValue;
12
    },
13
    // TODO: Should we perform this transform too?
14
    // https://github.com/mathml-refresh/mathml/issues/122
15
    // add_leading_and_trimming_whitespace: function(value) {
16
    //    var space = "\0020\0009\000A\000D";
17
    //    return `${space}${space}${value}${space}${space}`;
18
    // },
19
};
20
21
function TransformAttributeValues(transform, attributeNames) {
22
    if (typeof attributeNames === "string")
23
        attributeNames = [attributeNames];
24
    attributeNames.forEach(name => {
25
        Array.from(document.querySelectorAll(`[${name}]`)).forEach(element => {
26
            var value = element.getAttribute(name);
27
            var transformedValue = AttributeValueTransforms[transform](value);
28
            element.setAttribute(name, transformedValue);
29
        });
30
    });
31
}
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/box-comparison.js +106 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/box-comparison.js_sec1
1
function spaceBetween(childBox, parentBox) {
2
    return {
3
        left: childBox.left - parentBox.left,
4
        right: parentBox.right - childBox.right,
5
        top: childBox.top - parentBox.top,
6
        bottom: parentBox.bottom - childBox.bottom
7
    };
8
}
9
10
function measureSpaceAround(id) {
11
    var mrow = document.getElementById(id);
12
    var mrowBox = mrow.getBoundingClientRect();
13
    var parentBox = mrow.parentNode.getBoundingClientRect();
14
    var childBox = mrow.firstElementChild.getBoundingClientRect();
15
    return spaceBetween(childBox, parentBox);
16
}
17
18
function compareSpaceWithAndWithoutStyle(tag, style, parentStyle, direction) {
19
    if (!FragmentHelper.isValidChildOfMrow(tag) ||
20
        FragmentHelper.isEmpty(tag))
21
        throw `Invalid argument: ${tag}`;
22
23
    if (!direction)
24
      direction = "ltr";
25
    document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
26
<div style="display: inline-block"><math><mrow dir="${direction}">${MathMLFragments[tag]}</mrow></math></div>\
27
<div style="display: inline-block"><math><mrow dir="${direction}">${MathMLFragments[tag]}</mrow></math></div>\
28
</div>`);
29
    var div = document.body.lastElementChild;
30
31
    var styleDiv = div.firstElementChild;
32
    var styleMath = styleDiv.firstElementChild;
33
    var styleParent = styleMath.firstElementChild;
34
    if (parentStyle)
35
        styleParent.setAttribute("style", parentStyle);
36
    var styleElement = FragmentHelper.element(styleMath);
37
    styleElement.setAttribute("style", style);
38
    var styleChild = FragmentHelper.forceNonEmptyElement(styleElement);
39
    var styleMathBox = styleMath.getBoundingClientRect();
40
    var styleElementBox = styleElement.getBoundingClientRect();
41
    var styleChildBox = styleChild.getBoundingClientRect();
42
    var styleSpace = spaceBetween(styleChildBox, styleMathBox);
43
44
    var noStyleDiv = div.lastElementChild;
45
    var noStyleMath = noStyleDiv.firstElementChild;
46
    var noStyleElement = FragmentHelper.element(noStyleMath);
47
    var noStyleChild = FragmentHelper.forceNonEmptyElement(noStyleElement);
48
    var noStyleMathBox = noStyleMath.getBoundingClientRect();
49
    var noStyleElementBox = noStyleElement.getBoundingClientRect();
50
    var noStyleChildBox = noStyleChild.getBoundingClientRect();
51
    var noStyleSpace = spaceBetween(noStyleChildBox, noStyleMathBox);
52
53
    var preferredWidthDelta =
54
        styleDiv.getBoundingClientRect().width -
55
        noStyleDiv.getBoundingClientRect().width;
56
57
    div.style = "display: none;"; // Hide the div after measurement.
58
59
    return {
60
        preferred_width_delta: preferredWidthDelta,
61
        left_delta: styleSpace.left - noStyleSpace.left,
62
        right_delta: styleSpace.right - noStyleSpace.right,
63
        top_delta: styleSpace.top - noStyleSpace.top,
64
        bottom_delta: styleSpace.bottom - noStyleSpace.bottom,
65
        element_width_delta: styleElementBox.width - noStyleElementBox.width,
66
        element_height_delta: styleElementBox.height - noStyleElementBox.height
67
    };
68
}
69
70
function compareSizeWithAndWithoutStyle(tag, style) {
71
    if (!FragmentHelper.isValidChildOfMrow(tag))
72
        throw `Invalid argument: ${tag}`;
73
74
    document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
75
<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\
76
<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\
77
</div>`);
78
    var div = document.body.lastElementChild;
79
80
    var styleDiv = div.firstElementChild;
81
    var styleMath = styleDiv.firstElementChild;
82
    var styleElement = FragmentHelper.element(styleMath);
83
    styleElement.setAttribute("style", style);
84
    var styleMathBox = styleMath.getBoundingClientRect();
85
    var styleElementBox = styleElement.getBoundingClientRect();
86
87
    var noStyleDiv = div.lastElementChild;
88
    var noStyleMath = noStyleDiv.firstElementChild;
89
    var noStyleElement = FragmentHelper.element(noStyleMath);
90
    var noStyleMathBox = noStyleMath.getBoundingClientRect();
91
    var noStyleElementBox = noStyleElement.getBoundingClientRect();
92
93
    var preferredWidthDelta =
94
        styleDiv.getBoundingClientRect().width -
95
        noStyleDiv.getBoundingClientRect().width;
96
97
    div.style = "display: none;"; // Hide the div after measurement.
98
99
    return {
100
        preferred_width_delta: preferredWidthDelta,
101
        width_delta: styleMathBox.width - noStyleMathBox.width,
102
        height_delta: styleMathBox.height - noStyleMathBox.height,
103
        element_width_delta: styleElementBox.width - noStyleElementBox.width,
104
        element_height_delta: styleElementBox.height - noStyleElementBox.height
105
    };
106
};
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/feature-detection.js +148 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/feature-detection.js_sec1
1
// This is a helper for MathML feature detection.
2
// It is indented to be used to prevent false negative test results.
3
4
var MathMLFeatureDetection = {
5
6
    has_mspace: function() {
7
        // https://mathml-refresh.github.io/mathml-core/#space-mspace
8
        if (!this.hasOwnProperty("_has_mspace")) {
9
            document.body.insertAdjacentHTML("beforeend", "<math>\
10
<mspace></mspace>\
11
<mspace width='20px'></mspace>\
12
</math>");
13
            var math = document.body.lastElementChild;
14
            // The width attribute will add 20px per MathML and none if not supported.
15
            this._has_mspace =
16
                math.lastChild.getBoundingClientRect().width -
17
                math.firstChild.getBoundingClientRect().width > 10;
18
            document.body.removeChild(math);
19
        }
20
        return this._has_mspace;
21
    },
22
23
    has_operator_spacing: function() {
24
        // https://mathml-refresh.github.io/mathml-core/#dfn-lspace
25
        // https://mathml-refresh.github.io/mathml-core/#layout-of-mrow
26
        if (!this.hasOwnProperty("_has_operator_spacing")) {
27
            document.body.insertAdjacentHTML("beforeend", "<math>\
28
<mrow>\
29
  <mn>1</mn><mo lspace='0px' rspace='0px'>+</mo><mn>2</mn>\
30
</mrow>\
31
<mrow>\
32
  <mn>1</mn><mo lspace='8px' rspace='8px'>+</mo><mn>2</mn>\
33
</mrow>\
34
</math>");
35
            var math = document.body.lastElementChild;
36
            var mrow = math.getElementsByTagName("mrow");
37
            // lspace/rspace will add 16px per MathML and none if not supported.
38
            this._has_operator_spacing =
39
                mrow[1].getBoundingClientRect().width -
40
                mrow[0].getBoundingClientRect().width > 10;
41
            document.body.removeChild(math);
42
        }
43
        return this._has_operator_spacing;
44
    },
45
46
    has_mfrac: function() {
47
        if (!this.hasOwnProperty("_has_mfrac")) {
48
            // Use tall enough fraction to avoid side effect of min num/denum shifts.
49
            document.body.insertAdjacentHTML("beforeend", "<math>\
50
<mfrac>\
51
  <mspace height='50px' depth='50px'></mspace>\
52
  <mspace height='50px' depth='50px'></mspace>\
53
</mfrac>\
54
<mfrac>\
55
  <mspace height='60px' depth='60px'></mspace>\
56
  <mspace height='60px' depth='60px'></mspace>\
57
</mfrac>\
58
</math>");
59
            var math = document.body.lastElementChild;
60
            var mfrac = math.getElementsByTagName("mfrac");
61
            // height/depth will add 40px per MathML, 20px if mfrac does not stack its children and none if mspace is not supported.
62
            this._has_mfrac =
63
                mfrac[1].getBoundingClientRect().height -
64
                mfrac[0].getBoundingClientRect().height > 30;
65
            document.body.removeChild(math);
66
        }
67
        return this._has_mfrac;
68
    },
69
70
    has_msqrt: function() {
71
        if (!this.hasOwnProperty("_has_msqrt")) {
72
            document.body.insertAdjacentHTML("beforeend", "<math>\
73
<mrow style='font-size: 20px !important'>\
74
  <mtext>A</mtext>\
75
</mrow>\
76
<msqrt style='font-size: 20px !important'>\
77
  <mtext>A</mtext>\
78
</msqrt>\
79
</math>");
80
            var math = document.body.lastElementChild;
81
            // The radical symbol will make msqrt wider than mrow, if the former is supported.
82
            this._has_msqrt =
83
                math.lastElementChild.getBoundingClientRect().width -
84
                math.firstElementChild.getBoundingClientRect().width > 5;
85
            document.body.removeChild(math);
86
        }
87
        return this._has_msqrt;
88
    },
89
90
    has_menclose: function() {
91
        if (!this.hasOwnProperty("_has_menclose")) {
92
            document.body.insertAdjacentHTML("beforeend", "<math>\
93
<mrow style='font-size: 20px !important'>\
94
  <mrow>\
95
    <mrow>\
96
      <mrow>\
97
        <mtext>A</mtext>\
98
      </mrow>\
99
    </mrow>\
100
  </mrow>\
101
</mrow>\
102
<menclose notation='box' style='font-size: 20px !important'>\
103
  <menclose notation='box'>\
104
    <menclose notation='box'>\
105
      <menclose notation='box'>\
106
        <mtext>A</mtext>\
107
      </menclose>\
108
    </menclose>\
109
  </menclose>\
110
</menclose>\
111
</math>");
112
            var math = document.body.lastElementChild;
113
            // The boxes will make menclose wider than mrow, if the former is supported.
114
            this._has_menclose =
115
                math.lastElementChild.getBoundingClientRect().width -
116
                math.firstElementChild.getBoundingClientRect().width > 5;
117
            document.body.removeChild(math);
118
        }
119
        return this._has_menclose;
120
    },
121
122
    has_dir: function() {
123
        if (!this.hasOwnProperty("_has_dir")) {
124
            document.body.insertAdjacentHTML("beforeend", "<math style='direction: ltr !important;'>\
125
<mtext dir='rtl'></mtext>\
126
</math>");
127
            var math = document.body.lastElementChild;
128
            this._has_dir =
129
                window.getComputedStyle(math.firstElementChild).
130
                getPropertyValue('direction') === 'rtl';
131
            document.body.removeChild(math);
132
        }
133
        return this._has_dir;
134
    },
135
136
    ensure_for_match_reftest: function(has_function) {
137
        if (!document.querySelector("link[rel='match']"))
138
            throw "This function must only be used for match reftest";
139
        // Add a little red square at the top left corner if the feature is not supported in order to make match reftest fail.
140
        if (!this[has_function]()) {
141
            document.body.insertAdjacentHTML("beforeend", "\
142
<div style='width: 10px !important; height: 10px !important;\
143
            position: absolute !important;\
144
            left: 0 !important; top: 0 !important;\
145
            background: red !important; z-index: 1000 !important;'></div>");
146
        }
147
    }
148
};
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/layout-comparison.js +105 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/layout-comparison.js_sec1
1
function getWritingMode(element, reference) {
2
    var style = window.getComputedStyle(reference);
3
    if (style.getPropertyValue("writing-mode") !== "horizontal-tb" ||
4
        style.getPropertyValue("direction") !== "ltr")
5
        throw "Reference should have writing mode horizontal-tb and ltr";
6
7
    style = window.getComputedStyle(element);
8
    var param =  {
9
        rtl: style.getPropertyValue("direction") === "rtl",
10
        mode: style.getPropertyValue("writing-mode")
11
    };
12
13
    return param;
14
}
15
16
function compareSize(element, reference, epsilon) {
17
    var param = getWritingMode(element, reference);
18
    var elementBox = element.getBoundingClientRect();
19
    var referenceBox = reference.getBoundingClientRect();
20
21
    switch(param.mode) {
22
    case "horizontal-tb":
23
        assert_approx_equals(elementBox.width, referenceBox.width, epsilon,
24
                             "inline size");
25
        assert_approx_equals(elementBox.height, referenceBox.height, epsilon,
26
                             "block size");
27
        break;
28
    case "vertical-lr":
29
    case "vertical-rl":
30
        assert_approx_equals(elementBox.width, referenceBox.height, epsilon,
31
                             "inline size");
32
        assert_approx_equals(elementBox.height, referenceBox.width, epsilon,
33
                             "block size");
34
        break;
35
    default:
36
        throw "compareSize: Unrecognized writing-mode value";
37
    }
38
}
39
40
function participateToParentLayout(child) {
41
    var style = window.getComputedStyle(child);
42
    return style.getPropertyValue("display") !== "none" &&
43
        style.getPropertyValue("position") !== "absolute" &&
44
        style.getPropertyValue("position") !== "fixed";
45
}
46
47
function childrenParticipatingToLayout(element) {
48
    var children = [];
49
    Array.from(element.children).forEach(child => {
50
        if (participateToParentLayout(child))
51
            children.push(child);
52
    })
53
    return children;
54
}
55
56
function compareLayout(element, reference, epsilon) {
57
    // Compare sizes of elements and children.
58
    var param = getWritingMode(element, reference);
59
60
    compareSize(element, reference, epsilon);
61
    var elementBox = element.getBoundingClientRect();
62
    var referenceBox = reference.getBoundingClientRect();
63
64
    var elementChildren = childrenParticipatingToLayout(element);
65
    var referenceChildren = childrenParticipatingToLayout(reference);
66
    if (elementChildren.length != referenceChildren.length)
67
        throw "Reference should have the same number of children participating to layout."
68
69
    for (var i = 0; i < elementChildren.length; i++) {
70
        compareSize(elementChildren[i], referenceChildren[i], epsilon);
71
72
        var childBox = elementChildren[i].getBoundingClientRect();
73
        var referenceChildBox = referenceChildren[i].getBoundingClientRect();
74
75
        switch(param.mode) {
76
        case "horizontal-tb":
77
            assert_approx_equals(param.rtl ?
78
                                 elementBox.right - childBox.right :
79
                                 childBox.left - elementBox.left,
80
                                 referenceChildBox.left - referenceBox.left,
81
                                 epsilon,
82
                                 `inline position (child ${i})`);
83
            assert_approx_equals(childBox.top - elementBox.top,
84
                                 referenceChildBox.top - referenceBox.top,
85
                                 epsilon,
86
                                 `block position (child ${i})`);
87
            break;
88
        case "vertical-lr":
89
        case "vertical-rl":
90
            assert_approx_equals(param.rtl ?
91
                                 elementBox.bottom - childBox.bottom :
92
                                 childBox.top - elementBox.top,
93
                                 referenceChildBox.left - referenceBox.left,
94
                                 epsilon,
95
                                 `inline position (child ${i})`);
96
            assert_approx_equals(elementBox.right - childBox.right,
97
                                 referenceChildBox.top - referenceBox.top,
98
                                 epsilon,
99
                                 `block position (child ${i})`);
100
            break;
101
        default:
102
            throw "compareLayout: Unrecognized writing-mode value";
103
        }
104
    }
105
}
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/mathml-fragments.js +162 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/mathml-fragments.js_sec1
1
var MathMLFragments = {
2
    "annotation": "\
3
<semantics>\
4
  <mrow></mrow>\
5
  <annotation class='element text-container'></annotation>\
6
</semantics>",
7
    "annotation-xml": "\
8
<semantics>\
9
  <mrow></mrow>\
10
  <annotation-xml class='element text-container foreign-container'></annotation-xml>\
11
</semantics>",
12
    "maction": "\
13
<maction class='element' actiontype='statusline'>\
14
  <mrow class='mathml-container'></mrow>\
15
  <mtext class='text-container'></mtext>\
16
</maction>",
17
    "menclose": "<menclose class='element mathml-container'></menclose>",
18
    "merror": "<merror class='element mathml-container'></merror>",
19
    "mfrac": "\
20
<mfrac class='element'>\
21
  <mrow class='mathml-container'></mrow>\
22
  <mrow class='mathml-container'></mrow>\
23
</mfrac>",
24
    "mi": "<mi class='element text-container foreign-container'></mi>",
25
    "mmultiscripts": "\
26
<mmultiscripts class='element'>\
27
  <mrow class='mathml-container'></mrow>\
28
  <mrow class='mathml-container'></mrow>\
29
  <mrow class='mathml-container'></mrow>\
30
</mmultiscripts>",
31
    "mn": "<mn class='element text-container foreign-container'></mn>",
32
    "mo": "<mo class='element text-container foreign-container'></mo>",
33
    "mover": "\
34
<mover class='element'>\
35
  <mrow class='mathml-container'></mrow>\
36
  <mrow class='mathml-container'></mrow>\
37
</mover>",
38
    "mpadded": "<mpadded class='element mathml-container'></mpadded>",
39
    "mphantom": "<mphantom class='element mathml-container'></mphantom>",
40
    "mprescripts": "\
41
<mmultiscripts>\
42
  <mrow class='mathml-container'></mrow>\
43
  <mprescripts class='element'/>\
44
  <mrow class='mathml-container'></mrow>\
45
  <mrow class='mathml-container'></mrow>\
46
</mmultiscripts>",
47
    "mroot": "\
48
<mroot class='element'>\
49
  <mrow class='mathml-container'></mrow>\
50
  <mrow class='mathml-container'></mrow>\
51
</mroot>",
52
    "mrow": "<mrow class='element mathml-container'></mrow>",
53
    "ms": "<ms class='element text-container foreign-container'></ms>",
54
    "mspace": "<mspace class='element'></mspace>",
55
    "msqrt": "<msqrt class='element mathml-container'></msqrt>",
56
    "mstyle": "<mstyle class='element mathml-container'></mstyle>",
57
    "msub": "\
58
<msub class='element'>\
59
  <mrow class='mathml-container'></mrow>\
60
  <mrow class='mathml-container'></mrow>\
61
</msub>",
62
    "msubsup": "\
63
<msubsup class='element'>\
64
  <mrow class='mathml-container'></mrow>\
65
  <mrow class='mathml-container'></mrow>\
66
  <mrow class='mathml-container'></mrow>\
67
</msubsup>",
68
    "msup": "\
69
<msup class='element'>\
70
  <mrow class='mathml-container'></mrow>\
71
  <mrow class='mathml-container'></mrow>\
72
</msup>",
73
    "mtable": "\
74
<mtable class='element'>\
75
  <mtr>\
76
    <mtd class='mathml-container'>\
77
    </mtd>\
78
  </mtr>\
79
</mtable>",
80
    "mtd": "\
81
<mtable>\
82
  <mtr>\
83
    <mtd class='element mathml-container'>\
84
    </mtd>\
85
  </mtr>\
86
</mtable>",
87
    "mtext": "<mtext class='element text-container foreign-container'></mtext>",
88
    "mtr": "\
89
<mtable>\
90
  <mtr class='element'>\
91
    <mtd class='mathml-container'>\
92
    </mtd>\
93
  </mtr>\
94
</mtable>",
95
    "munder": "\
96
<munder class='element'>\
97
  <mrow class='mathml-container'></mrow>\
98
  <mrow class='mathml-container'></mrow>\
99
</munder>",
100
    "munderover": "\
101
<munderover class='element'>\
102
  <mrow class='mathml-container'></mrow>\
103
  <mrow class='mathml-container'></mrow>\
104
  <mrow class='mathml-container'></mrow>\
105
</munderover>",
106
    "none": "\
107
<mmultiscripts>\
108
  <mrow class='mathml-container'></mrow>\
109
  <none class='element'/>\
110
  <mrow class='mathml-container'></mrow>\
111
</mmultiscripts>",
112
    "semantics": "\
113
<semantics class='element'>\
114
  <mrow class='mathml-container'></mrow>\
115
  <annotation class='text-container'></annotation>\
116
</semantics>"
117
};
118
119
var FragmentHelper = {
120
    createElement: function(tag) {
121
        return document.createElementNS("http://www.w3.org/1998/Math/MathML", tag);
122
    },
123
124
    isValidChildOfMrow: function(tag) {
125
        return !(tag == "annotation" ||
126
                 tag == "annotation-xml" ||
127
                 tag == "mprescripts" ||
128
                 tag == "none" ||
129
                 tag == "mtr" ||
130
                 tag == "mtd");
131
    },
132
133
    isEmpty: function(tag) {
134
        return tag === "mspace" || tag == "mprescripts" || tag == "none";
135
    },
136
137
    element: function(fragment) {
138
        return fragment.getElementsByClassName('element')[0];
139
    },
140
141
    appendChild: function(fragment, allowInvalid) {
142
        var element = this.element(fragment) || fragment;
143
        if (element.classList.contains("foreign-container")) {
144
            var el = document.createElement("span");
145
            el.textContent = "a";
146
            return element.appendChild(el);
147
        }
148
        if (element.classList.contains("mathml-container") || allowInvalid) {
149
            var el = this.createElement("mi");
150
            el.textContent = "a";
151
            return element.appendChild(el);
152
        }
153
        throw "Cannot append child to the element";
154
    },
155
156
    forceNonEmptyElement: function(fragment) {
157
        var element = this.element(fragment) || fragment;
158
        if (element.firstElementChild)
159
            return element.firstElementChild;
160
        return this.appendChild(fragment);
161
    }
162
}
- a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/w3c-import.log +21 lines
Line 0 a/LayoutTests/imported/w3c/web-platform-tests/mathml/support/w3c-import.log_sec1
1
The tests in this directory were imported from the W3C repository.
2
Do NOT modify these tests directly in WebKit.
3
Instead, create a pull request on the WPT github:
4
	https://github.com/web-platform-tests/wpt
5
6
Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
7
8
Do NOT modify or remove this file.
9
10
------------------------------------------------------------------------
11
Properties requiring vendor prefixes:
12
None
13
Property values requiring vendor prefixes:
14
None
15
------------------------------------------------------------------------
16
List of files:
17
/LayoutTests/imported/w3c/web-platform-tests/mathml/support/attribute-values.js
18
/LayoutTests/imported/w3c/web-platform-tests/mathml/support/box-comparison.js
19
/LayoutTests/imported/w3c/web-platform-tests/mathml/support/feature-detection.js
20
/LayoutTests/imported/w3c/web-platform-tests/mathml/support/layout-comparison.js
21
/LayoutTests/imported/w3c/web-platform-tests/mathml/support/mathml-fragments.js
- a/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt -3 / +3 lines
Lines 35-43 PASS a["title"] is a/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt_sec1
35
PASS a["lang"] is 
35
PASS a["lang"] is 
36
PASS a["translate"] is true
36
PASS a["translate"] is true
37
PASS a["dir"] is 
37
PASS a["dir"] is 
38
PASS a["dataset"] is [object DOMStringMap]
39
PASS a["hidden"] is false
38
PASS a["hidden"] is false
40
PASS a["tabIndex"] is 0
41
PASS a["accessKey"] is 
39
PASS a["accessKey"] is 
42
PASS a["draggable"] is true
40
PASS a["draggable"] is true
43
PASS a["spellcheck"] is true
41
PASS a["spellcheck"] is true
Lines 45-51 PASS a["innerText"] is nerget a/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt_sec2
45
PASS a["contentEditable"] is inherit
43
PASS a["contentEditable"] is inherit
46
PASS a["isContentEditable"] is false
44
PASS a["isContentEditable"] is false
47
PASS a["offsetParent"] is [object HTMLBodyElement]
45
PASS a["offsetParent"] is [object HTMLBodyElement]
48
PASS a["offsetTop"] is 714
46
PASS a["offsetTop"] is 684
49
PASS a["offsetLeft"] is 8
47
PASS a["offsetLeft"] is 8
50
PASS a["offsetWidth"] is 40
48
PASS a["offsetWidth"] is 40
51
PASS a["offsetHeight"] is 18
49
PASS a["offsetHeight"] is 18
Lines 129-134 PASS a["onpointerover"] is null a/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt_sec3
129
PASS a["onpointerout"] is null
127
PASS a["onpointerout"] is null
130
PASS a["onpointerenter"] is null
128
PASS a["onpointerenter"] is null
131
PASS a["onpointerleave"] is null
129
PASS a["onpointerleave"] is null
130
PASS a["dataset"] is [object DOMStringMap]
131
PASS a["tabIndex"] is 0
132
PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
132
PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
133
PASS a["prefix"] is null
133
PASS a["prefix"] is null
134
PASS a["localName"] is a
134
PASS a["localName"] is a
- a/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt -3 / +3 lines
Lines 37-45 PASS a["title"] is a/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt_sec1
37
PASS a["lang"] is 
37
PASS a["lang"] is 
38
PASS a["translate"] is true
38
PASS a["translate"] is true
39
PASS a["dir"] is 
39
PASS a["dir"] is 
40
PASS a["dataset"] is [object DOMStringMap]
41
PASS a["hidden"] is false
40
PASS a["hidden"] is false
42
PASS a["tabIndex"] is 0
43
PASS a["accessKey"] is 
41
PASS a["accessKey"] is 
44
PASS a["draggable"] is true
42
PASS a["draggable"] is true
45
PASS a["spellcheck"] is true
43
PASS a["spellcheck"] is true
Lines 47-53 PASS a["innerText"] is nerget a/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt_sec2
47
PASS a["contentEditable"] is inherit
45
PASS a["contentEditable"] is inherit
48
PASS a["isContentEditable"] is false
46
PASS a["isContentEditable"] is false
49
PASS a["offsetParent"] is [object HTMLBodyElement]
47
PASS a["offsetParent"] is [object HTMLBodyElement]
50
PASS a["offsetTop"] is 744
48
PASS a["offsetTop"] is 714
51
PASS a["offsetLeft"] is 8
49
PASS a["offsetLeft"] is 8
52
PASS a["offsetWidth"] is 40
50
PASS a["offsetWidth"] is 40
53
PASS a["offsetHeight"] is 18
51
PASS a["offsetHeight"] is 18
Lines 132-137 PASS a["onpointerover"] is null a/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt_sec3
132
PASS a["onpointerout"] is null
130
PASS a["onpointerout"] is null
133
PASS a["onpointerenter"] is null
131
PASS a["onpointerenter"] is null
134
PASS a["onpointerleave"] is null
132
PASS a["onpointerleave"] is null
133
PASS a["dataset"] is [object DOMStringMap]
134
PASS a["tabIndex"] is 0
135
PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
135
PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
136
PASS a["prefix"] is null
136
PASS a["prefix"] is null
137
PASS a["localName"] is a
137
PASS a["localName"] is a
- a/LayoutTests/platform/mac/inspector/model/remote-object-dom-expected.txt -3 / +3 lines
Lines 166-174 EXPRESSION: span = document.createElement("span"); span.id = "foo"; span a/LayoutTests/platform/mac/inspector/model/remote-object-dom-expected.txt_sec1
166
        "_value": ""
166
        "_value": ""
167
      },
167
      },
168
      {
168
      {
169
        "_name": "dataset",
169
        "_name": "hidden",
170
        "_type": "object",
170
        "_type": "boolean",
171
        "_value": "DOMStringMap"
171
        "_value": "false"
172
      }
172
      }
173
    ],
173
    ],
174
    "_entries": null
174
    "_entries": null

Return to Bug 200470