WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-179020-20171102153116.patch (text/plain), 33.50 KB, created by
Aishwarya Nirmal
on 2017-11-02 15:31:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aishwarya Nirmal
Created:
2017-11-02 15:31:16 PDT
Size:
33.50 KB
patch
obsolete
>Subversion Revision: 224184 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 09d4e88e3977216306321b76a1f7c16b8ee45ffc..316c1cc8b012f06dc3510c3e2a9e53a30cc7adaf 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,39 @@ >+2017-11-02 Aishwarya Nirmal <anirmal@apple.com> >+ >+ [Touch Bar Web API] Add support for menuitem tag >+ https://bugs.webkit.org/show_bug.cgi?id=179020 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The Touch Bar Web API will make use of the menu and menuitem tags >+ to represent the NSTouchBar and NSTouchBarItem respectively. >+ Since WebKit currently does not offer support for the menuitem tag, >+ this change adds it in. There is a runtime flag for this tag, which >+ is set to false by default. >+ >+ A specification for the menuitem element can be found at >+ https://www.w3.org/TR/2013/WD-html51-20130528/interactive-elements.html#the-menuitem-element. >+ More attributes of this element will be implemented in future patches. >+ >+ Test: fast/html/menuitem-element.html >+ >+ * CMakeLists.txt: >+ * DerivedSources.cpp: >+ * DerivedSources.make: >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/WebCoreBuiltinNames.h: >+ * html/HTMLElementsAllInOne.cpp: >+ * html/HTMLMenuItemElement.cpp: Added. >+ (WebCore::HTMLMenuItemElement::HTMLMenuItemElement): >+ (WebCore::HTMLMenuItemElement::create): >+ * html/HTMLMenuItemElement.h: Added. >+ * html/HTMLMenuItemElement.idl: Added. >+ * html/HTMLTagNames.in: >+ * page/RuntimeEnabledFeatures.h: >+ (WebCore::RuntimeEnabledFeatures::setMenuItemElementEnabled): >+ (WebCore::RuntimeEnabledFeatures::menuItemElementEnabled const): >+ > 2017-10-30 Antoine Quint <graouts@apple.com> > > [Web Animations] Expose the playbackRate property on Animation >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index fa671661725b7c9a5a52b4b2352d4603d51ab125..a919a554e95a0587b3f536dfe47588456e795241 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2017-11-02 Aishwarya Nirmal <anirmal@apple.com> >+ >+ [Touch Bar Web API] Add support for menuitem tag >+ https://bugs.webkit.org/show_bug.cgi?id=179020 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds in the MenuItemElementEnabled flag so that the menu item element is a runtime- >+ enabled feature. It has a default value of false. >+ >+ * Shared/WebPreferences.yaml: >+ * UIProcess/API/C/WKPreferences.cpp: >+ (WKPreferencesSetMenuItemElementEnabled): >+ (WKPreferencesGetMenuItemElementEnabled): >+ * UIProcess/API/C/WKPreferencesRefPrivate.h: >+ > 2017-10-30 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE][GTK] Expose availability of certain editing commands in WebKitEditorState >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 373b4cc1f10aeb0824c50d8d5306be9ccc6bba0b..0a3177214dd0d8c039b5a9f37882e129d9e70d84 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,21 @@ >+2017-11-02 Aishwarya Nirmal <anirmal@apple.com> >+ >+ [Touch Bar Web API] Add support for menuitem tag >+ https://bugs.webkit.org/show_bug.cgi?id=179020 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds in properties and methods that allow the menuitem runtime feature >+ to be enabled or disabled. >+ >+ * WebView/WebPreferenceKeysPrivate.h: >+ * WebView/WebPreferences.mm: >+ (-[WebPreferences menuItemElementEnabled]): >+ (-[WebPreferences setMenuItemElementEnabled:]): >+ * WebView/WebPreferencesPrivate.h: >+ * WebView/WebView.mm: >+ (-[WebView _preferencesChanged:]): >+ > 2017-10-28 Zalan Bujtas <zalan@apple.com> > > [FrameView::layout cleanup] Move core layout logic to a separate class. >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 1c1d7421876b8c82883694070b37768dcbe1db88..9cb25aaa535047e021d8ce7f9a500abb39dfa9dd 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -647,6 +647,7 @@ set(WebCore_NON_SVG_IDL_FILES > html/HTMLMarqueeElement.idl > html/HTMLMediaElement.idl > html/HTMLMenuElement.idl >+ html/HTMLMenuItemElement.idl > html/HTMLMetaElement.idl > html/HTMLMeterElement.idl > html/HTMLModElement.idl >diff --git a/Source/WebCore/DerivedSources.cpp b/Source/WebCore/DerivedSources.cpp >index 52a61fba53dccdcae8baf2dbc3679bf839609344..2633d3cd2535a30ce1b4741c16103ae588a7c7df 100644 >--- a/Source/WebCore/DerivedSources.cpp >+++ b/Source/WebCore/DerivedSources.cpp >@@ -254,6 +254,7 @@ > #include "JSHTMLMediaElement.cpp" > #include "JSHTMLMediaElementMediaSession.cpp" > #include "JSHTMLMenuElement.cpp" >+#include "JSHTMLMenuItemElement.cpp" > #include "JSHTMLMetaElement.cpp" > #include "JSHTMLMeterElement.cpp" > #include "JSHTMLModElement.cpp" >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index ca672c5d430cdd12ad61c45af87e2d6e5c4dcb61..4a788a0185ae779aab4c3406247f38de6ca973a6 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -563,6 +563,7 @@ JS_BINDING_IDLS = \ > $(WebCore)/html/HTMLMarqueeElement.idl \ > $(WebCore)/html/HTMLMediaElement.idl \ > $(WebCore)/html/HTMLMenuElement.idl \ >+ $(WebCore)/html/HTMLMenuItemElement.idl \ > $(WebCore)/html/HTMLMetaElement.idl \ > $(WebCore)/html/HTMLMeterElement.idl \ > $(WebCore)/html/HTMLModElement.idl \ >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index e656792ba0826555e8954b22da4afecd8aaeb8a6..d13aed0da9d010fe588c9abef01014e88dd79285 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -952,6 +952,7 @@ html/HTMLMapElement.cpp > html/HTMLMarqueeElement.cpp > html/HTMLMediaElement.cpp > html/HTMLMenuElement.cpp >+html/HTMLMenuItemElement.cpp > html/HTMLMetaElement.cpp > html/HTMLMeterElement.cpp > html/HTMLModElement.cpp >@@ -2494,6 +2495,7 @@ JSHTMLMarqueeElement.cpp > JSHTMLMediaElement.cpp > JSHTMLMediaElementMediaSession.cpp > JSHTMLMenuElement.cpp >+JSHTMLMenuItemElement.cpp > JSHTMLMetaElement.cpp > JSHTMLMeterElement.cpp > JSHTMLModElement.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index ea569d15f6383424bfa77d6d0ad19043c5a38983..af04ed06e5f87809957fe0a3743bda5b78a7b472 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -804,6 +804,7 @@ > 2EDF369D122C94B4002F7D4E /* FileReaderSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDF369B122C94B4002F7D4E /* FileReaderSync.h */; }; > 2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFE9121C9F4200C27627 /* FileStream.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFF8121CB0CE00C27627 /* FileStreamClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 2F31E0751FA3B62B00E059BA /* HTMLMenuItemElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F31E0711FA3B33B00E059BA /* HTMLMenuItemElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 3103B7DF1DB01567008BB890 /* ColorHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 3103B7DE1DB01556008BB890 /* ColorHash.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 31078CC71880AAB5008099DC /* OESTextureHalfFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31078CC21880A6A6008099DC /* OESTextureHalfFloatLinear.cpp */; }; > 31078CC81880AABB008099DC /* OESTextureHalfFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 31078CC31880A6A6008099DC /* OESTextureHalfFloatLinear.h */; }; >@@ -6450,6 +6451,9 @@ > 2EF1BFE8121C9F4200C27627 /* FileStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileStream.cpp; sourceTree = "<group>"; }; > 2EF1BFE9121C9F4200C27627 /* FileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStream.h; sourceTree = "<group>"; }; > 2EF1BFF8121CB0CE00C27627 /* FileStreamClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStreamClient.h; sourceTree = "<group>"; }; >+ 2F31E0711FA3B33B00E059BA /* HTMLMenuItemElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLMenuItemElement.h; sourceTree = "<group>"; }; >+ 2F31E0731FA3B33C00E059BA /* HTMLMenuItemElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMenuItemElement.cpp; sourceTree = "<group>"; }; >+ 2F31E0761FA3C10B00E059BA /* HTMLMenuItemElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLMenuItemElement.idl; sourceTree = "<group>"; }; > 3103B7DE1DB01556008BB890 /* ColorHash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ColorHash.h; sourceTree = "<group>"; }; > 31055BB81E4FE18900EB604E /* WebKitFontFamilyNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitFontFamilyNames.in; sourceTree = "<group>"; }; > 31078CC21880A6A6008099DC /* OESTextureHalfFloatLinear.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OESTextureHalfFloatLinear.cpp; sourceTree = "<group>"; }; >@@ -19635,6 +19639,9 @@ > A8EA79EC0A1916DF00A8EF5F /* HTMLMenuElement.cpp */, > A8EA79E80A1916DF00A8EF5F /* HTMLMenuElement.h */, > 1AE2AE430A1D269E00B42B25 /* HTMLMenuElement.idl */, >+ 2F31E0731FA3B33C00E059BA /* HTMLMenuItemElement.cpp */, >+ 2F31E0711FA3B33B00E059BA /* HTMLMenuItemElement.h */, >+ 2F31E0761FA3C10B00E059BA /* HTMLMenuItemElement.idl */, > A871DC1B0A15205700B12A68 /* HTMLMetaElement.cpp */, > A871DC180A15205700B12A68 /* HTMLMetaElement.h */, > A80E79FC0A19C307007FB8C5 /* HTMLMetaElement.idl */, >@@ -26929,6 +26936,7 @@ > CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */, > C937FE8D1B1F6821008ECC5D /* HTMLMediaElementMediaSession.h in Headers */, > A8EA79F40A1916DF00A8EF5F /* HTMLMenuElement.h in Headers */, >+ 2F31E0751FA3B62B00E059BA /* HTMLMenuItemElement.h in Headers */, > 2BE8E2C712A589EC00FAD550 /* HTMLMetaCharsetParser.h in Headers */, > A871DC240A15205700B12A68 /* HTMLMetaElement.h in Headers */, > A454424B119B3661009BE912 /* HTMLMeterElement.h in Headers */, >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index 369a102f346eb133b706e8c2e6602782f9137ed9..f1007f7f9c11bf328f57371e1143524ed3be5d5e 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -62,6 +62,7 @@ namespace WebCore { > macro(GamepadEvent) \ > macro(HTMLAttachmentElement) \ > macro(HTMLAudioElement) \ >+ macro(HTMLMenuItemElement) \ > macro(HTMLSlotElement) \ > macro(Headers) \ > macro(IDBCursor) \ >diff --git a/Source/WebCore/html/HTMLElementsAllInOne.cpp b/Source/WebCore/html/HTMLElementsAllInOne.cpp >index dd663d2c07be3e2635336d7b963f402ea2e4dce9..25707f6f6a71510857da8c601ba9235f1630d8cd 100644 >--- a/Source/WebCore/html/HTMLElementsAllInOne.cpp >+++ b/Source/WebCore/html/HTMLElementsAllInOne.cpp >@@ -76,6 +76,7 @@ > #include "HTMLMarqueeElement.cpp" > #include "HTMLMediaElement.cpp" > #include "HTMLMenuElement.cpp" >+#include "HTMLMenuItemElement.cpp" > #include "HTMLMetaElement.cpp" > #include "HTMLMeterElement.cpp" > #include "HTMLModElement.cpp" >diff --git a/Source/WebCore/html/HTMLMenuItemElement.cpp b/Source/WebCore/html/HTMLMenuItemElement.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..19b1d582b348d11b6ec7cf30db0545a1a272d810 >--- /dev/null >+++ b/Source/WebCore/html/HTMLMenuItemElement.cpp >@@ -0,0 +1,46 @@ >+/* >+ * Copyright (C) 2017 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "HTMLMenuItemElement.h" >+ >+#include "HTMLNames.h" >+ >+namespace WebCore { >+ >+using namespace HTMLNames; >+ >+inline HTMLMenuItemElement::HTMLMenuItemElement(const QualifiedName& tagName, Document& document) >+ : HTMLElement(tagName, document) >+{ >+ ASSERT(hasTagName(menuitemTag)); >+} >+ >+Ref<HTMLMenuItemElement> HTMLMenuItemElement::create(const QualifiedName& tagName, Document& document) >+{ >+ return adoptRef(*new HTMLMenuItemElement(tagName, document)); >+} >+ >+} >diff --git a/Source/WebCore/html/HTMLMenuItemElement.h b/Source/WebCore/html/HTMLMenuItemElement.h >new file mode 100644 >index 0000000000000000000000000000000000000000..e24cfd2bd4dd1242960d53ba85d5d653604b6ba6 >--- /dev/null >+++ b/Source/WebCore/html/HTMLMenuItemElement.h >@@ -0,0 +1,40 @@ >+/* >+ * Copyright (C) 2017 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "HTMLElement.h" >+ >+namespace WebCore { >+ >+class HTMLMenuItemElement final : public HTMLElement { >+public: >+ static Ref<HTMLMenuItemElement> create(const QualifiedName&, Document&); >+ >+private: >+ HTMLMenuItemElement(const QualifiedName&, Document&); >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/html/HTMLMenuItemElement.idl b/Source/WebCore/html/HTMLMenuItemElement.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..52e4ceaeccb28f0a1f18883a132b54c98e2120cc >--- /dev/null >+++ b/Source/WebCore/html/HTMLMenuItemElement.idl >@@ -0,0 +1,28 @@ >+/* >+ * Copyright (C) 2017 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+[ >+ EnabledAtRuntime = MenuItemElement, >+] interface HTMLMenuItemElement : HTMLElement { >+}; >diff --git a/Source/WebCore/html/HTMLTagNames.in b/Source/WebCore/html/HTMLTagNames.in >index 5c7c8d77b51551936b25206aa017d235dcd8bb04..094cef28ae3b6b55e0c41c5d54aadc902a4450c6 100644 >--- a/Source/WebCore/html/HTMLTagNames.in >+++ b/Source/WebCore/html/HTMLTagNames.in >@@ -83,6 +83,7 @@ map > mark interfaceName=HTMLElement > marquee > menu >+menuitem interfaceName=HTMLMenuItemElement, runtimeEnabled=menuItemElement > meta > meter interfaceName=HTMLMeterElement, conditional=METER_ELEMENT > nav interfaceName=HTMLElement >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h >index 8adc91332e3c91a8f68776635fccc576acf84495..170df680ddc40cf510c5bfca43b487739e244b95 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.h >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h >@@ -73,6 +73,9 @@ public: > void setCustomElementsEnabled(bool areEnabled) { m_areCustomElementsEnabled = areEnabled; } > bool customElementsEnabled() const { return m_areCustomElementsEnabled; } > >+ void setMenuItemElementEnabled(bool isEnabled) { m_isMenuItemElementEnabled = isEnabled; } >+ bool menuItemElementEnabled() const { return m_isMenuItemElementEnabled; } >+ > void setDirectoryUploadEnabled(bool isEnabled) { m_isDirectoryUploadEnabled = isEnabled; } > bool directoryUploadEnabled() const { return m_isDirectoryUploadEnabled; } > >@@ -240,6 +243,7 @@ private: > bool m_isDisplayContentsEnabled { false }; > bool m_isShadowDOMEnabled { true }; > bool m_areCustomElementsEnabled { true }; >+ bool m_isMenuItemElementEnabled { false }; > bool m_isDirectoryUploadEnabled { false }; > bool m_areDataTransferItemsEnabled { false }; > bool m_inputEventsEnabled { true }; >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 8c4428e0faa8cd3ec18979e06e1733c58904eb5c..efe825c0b25a4e6050a0ed0617245393cb717ee1 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -639,6 +639,11 @@ CustomElementsEnabled: > defaultValue: true > webcoreBinding: RuntimeEnabledFeatures > >+MenuItemElementEnabled: >+ type: bool >+ defaultValue: false >+ webcoreBinding: RuntimeEnabledFeatures >+ > EncryptedMediaAPIEnabled: > type: bool > defaultValue: false >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >index 8d2626fbbf8203fa957cfd9c4852ffa9f9d52658..e254968b946e3a81017a7cb4553b741a117608cf 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >@@ -1720,6 +1720,16 @@ bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef > return toImpl(preferencesRef)->intersectionObserverEnabled(); > } > >+void WKPreferencesSetMenuItemElementEnabled(WKPreferencesRef preferencesRef, bool flag) >+{ >+ return toImpl(preferencesRef)->setMenuItemElementEnabled(flag); >+} >+ >+bool WKPreferencesGetMenuItemElementEnabled(WKPreferencesRef preferencesRef) >+{ >+ return toImpl(preferencesRef)->menuItemElementEnabled(); >+} >+ > void WKPreferencesSetUserTimingEnabled(WKPreferencesRef preferencesRef, bool flag) > { > toImpl(preferencesRef)->setUserTimingEnabled(flag); >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >index 0984486c0f8ac7ac528b002c2261e30fbce876c6..d2171f5f848f1e3ed52bccf4fadcfdc823d20740 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >+++ b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >@@ -470,6 +470,10 @@ WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, boo > WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef); > > // Defaults to false >+WK_EXPORT void WKPreferencesSetMenuItemElementEnabled(WKPreferencesRef, bool flag); >+WK_EXPORT bool WKPreferencesGetMenuItemElementEnabled(WKPreferencesRef); >+ >+// Defaults to false > WK_EXPORT void WKPreferencesSetDisplayContentsEnabled(WKPreferencesRef, bool flag); > WK_EXPORT bool WKPreferencesGetDisplayContentsEnabled(WKPreferencesRef); > >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >index bd94f64085f96a0f455bda4e0b1d4a12650ed27d..4afc1c188b3e72838132c22bc5e61ac81b4ba965 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >@@ -243,6 +243,7 @@ > #define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection" > #define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled" > #define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled" >+#define WebKitMenuItemElementEnabledPreferenceKey @"WebKitMenuItemElementEnabled" > #define WebKitDisplayContentsEnabledPreferenceKey @"WebKitDisplayContentsEnabled" > #define WebKitUserTimingEnabledPreferenceKey @"WebKitUserTimingEnabled" > #define WebKitResourceTimingEnabledPreferenceKey @"WebKitResourceTimingEnabled" >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >index a09548c9a3aa46a9a916970f10acb76db85bc5b7..12ee5101816c0b2d20684661333ebecd04fd3e27 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -3103,6 +3103,16 @@ static NSString *classIBCreatorID = nil; > [self _setBoolValue:flag forKey:WebKitIntersectionObserverEnabledPreferenceKey]; > } > >+- (BOOL)menuItemElementEnabled >+{ >+ return [self _boolValueForKey:WebKitMenuItemElementEnabledPreferenceKey]; >+} >+ >+- (void)setMenuItemElementEnabled:(BOOL)flag >+{ >+ [self _setBoolValue:flag forKey:WebKitMenuItemElementEnabledPreferenceKey]; >+} >+ > - (BOOL)displayContentsEnabled > { > return [self _boolValueForKey:WebKitDisplayContentsEnabledPreferenceKey]; >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >index 79084c9e9ab75ead1e027e60ae611d864da0ca06..414fcd3b26d309f10372196bfb9973ef1eb57555 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >@@ -581,6 +581,7 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification; > @property (nonatomic) BOOL attachmentElementEnabled; > @property (nonatomic) BOOL allowsInlineMediaPlaybackAfterFullscreen; > @property (nonatomic) BOOL intersectionObserverEnabled; >+@property (nonatomic) BOOL menuItemElementEnabled; > @property (nonatomic) BOOL displayContentsEnabled; > @property (nonatomic) BOOL userTimingEnabled; > @property (nonatomic) BOOL resourceTimingEnabled; >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 25ec127123f507a2d377181a72d5217bb18b3739..17da73ef641a6680fdd35660262b98a4ee482afc 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -3038,7 +3038,8 @@ static bool needsSelfRetainWhileLoadingQuirk() > RuntimeEnabledFeatures::sharedFeatures().setCredentialManagementEnabled(preferences.credentialManagementEnabled); > RuntimeEnabledFeatures::sharedFeatures().setIsSecureContextAttributeEnabled(preferences.isSecureContextAttributeEnabled); > RuntimeEnabledFeatures::sharedFeatures().setDirectoryUploadEnabled([preferences directoryUploadEnabled]); >- >+ RuntimeEnabledFeatures::sharedFeatures().setMenuItemElementEnabled([preferences menuItemElementEnabled]); >+ > #if ENABLE(LEGACY_ENCRYPTED_MEDIA) > RuntimeEnabledFeatures::sharedFeatures().setLegacyEncryptedMediaAPIEnabled(preferences.legacyEncryptedMediaAPIEnabled); > #endif >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 1df87868bf2f932f3052b9f3f9294b0deb671625..8d921eb752dfe74b25670bf7db4ec9cf0c6fd9de 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,24 @@ >+2017-11-02 Aishwarya Nirmal <anirmal@apple.com> >+ >+ [Touch Bar Web API] Add support for menuitem tag >+ https://bugs.webkit.org/show_bug.cgi?id=179020 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Defines flags for the menu item test so that the element is recognized >+ only while its test is being run. >+ >+ * DumpRenderTree/TestOptions.h: >+ * DumpRenderTree/TestOptions.mm: >+ (TestOptions::TestOptions): >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (setWebPreferencesForTestOptions): >+ * WebKitTestRunner/TestController.cpp: >+ (WTR::TestController::resetPreferencesToConsistentValues): >+ (WTR::updateTestOptionsFromTestHeader): >+ * WebKitTestRunner/TestOptions.h: >+ (WTR::TestOptions::hasSameInitializationOptions const): >+ > 2017-10-12 Frederic Wang <fwang@igalia.com> > > Remove support for running safari on the iOS simulator with Xcode < 9.0 >diff --git a/Tools/DumpRenderTree/TestOptions.h b/Tools/DumpRenderTree/TestOptions.h >index 89de43bdcb50e333ec01b900c77afc70c6a3f0ea..3f35e470e5da1d513424deacdeb477070848a8c6 100644 >--- a/Tools/DumpRenderTree/TestOptions.h >+++ b/Tools/DumpRenderTree/TestOptions.h >@@ -32,6 +32,7 @@ struct TestOptions { > bool enableAttachmentElement { false }; > bool useAcceleratedDrawing { false }; > bool enableIntersectionObserver { false }; >+ bool enableMenuItemElement { false }; > bool enableModernMediaControls { true }; > bool enablePointerLock { false }; > bool enableCredentialManagement { false }; >diff --git a/Tools/DumpRenderTree/TestOptions.mm b/Tools/DumpRenderTree/TestOptions.mm >index 438539b4eccb419bd253bc6fd671740b4adf2660..2cc1d2c7a64a87cbca6f988f3df6f5e5a5ef1080 100644 >--- a/Tools/DumpRenderTree/TestOptions.mm >+++ b/Tools/DumpRenderTree/TestOptions.mm >@@ -84,6 +84,8 @@ TestOptions::TestOptions(NSURL *testURL, const TestCommand& command) > this->useAcceleratedDrawing = parseBooleanTestHeaderValue(value); > else if (key == "enableIntersectionObserver") > this->enableIntersectionObserver = parseBooleanTestHeaderValue(value); >+ else if (key == "enableMenuItemElement") >+ this->enableMenuItemElement = parseBooleanTestHeaderValue(value); > else if (key == "enableModernMediaControls") > this->enableModernMediaControls = parseBooleanTestHeaderValue(value); > else if (key == "enablePointerLock") >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 31b199a9eaefd07def3935645a5124d9142c7b64..9c561747912bbb106772655cdfe4f4b5a3aa2950 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -984,6 +984,7 @@ static void setWebPreferencesForTestOptions(const TestOptions& options) > preferences.attachmentElementEnabled = options.enableAttachmentElement; > preferences.acceleratedDrawingEnabled = options.useAcceleratedDrawing; > preferences.intersectionObserverEnabled = options.enableIntersectionObserver; >+ preferences.menuItemElementEnabled = options.enableMenuItemElement; > preferences.modernMediaControlsEnabled = options.enableModernMediaControls; > preferences.credentialManagementEnabled = options.enableCredentialManagement; > preferences.isSecureContextAttributeEnabled = options.enableIsSecureContextAttribute; >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 4dfa4d93a34ee51fa8f0921397df2e16918baf1f..cd820973f4e94a27b85e9d96700258276f47aea9 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -689,6 +689,7 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio > WKPreferencesSetNeedsSiteSpecificQuirks(preferences, options.needsSiteSpecificQuirks); > WKPreferencesSetAttachmentElementEnabled(preferences, options.enableAttachmentElement); > WKPreferencesSetIntersectionObserverEnabled(preferences, options.enableIntersectionObserver); >+ WKPreferencesSetMenuItemElementEnabled(preferences, options.enableMenuItemElement); > WKPreferencesSetModernMediaControlsEnabled(preferences, options.enableModernMediaControls); > WKPreferencesSetCredentialManagementEnabled(preferences, options.enableCredentialManagement); > WKPreferencesSetIsSecureContextAttributeEnabled(preferences, options.enableIsSecureContextAttribute); >@@ -1040,6 +1041,8 @@ static void updateTestOptionsFromTestHeader(TestOptions& testOptions, const std: > testOptions.enableAttachmentElement = parseBooleanTestHeaderValue(value); > if (key == "enableIntersectionObserver") > testOptions.enableIntersectionObserver = parseBooleanTestHeaderValue(value); >+ if (key == "enableMenuItemElement") >+ testOptions.enableMenuItemElement = parseBooleanTestHeaderValue(value); > if (key == "enableModernMediaControls") > testOptions.enableModernMediaControls = parseBooleanTestHeaderValue(value); > if (key == "enablePointerLock") >diff --git a/Tools/WebKitTestRunner/TestOptions.h b/Tools/WebKitTestRunner/TestOptions.h >index e9e2fee58f940bbefd84420ac928d072e27fcbb6..96bd7ccc6e724fdcea4f0d5f3a3dd0ad81062b25 100644 >--- a/Tools/WebKitTestRunner/TestOptions.h >+++ b/Tools/WebKitTestRunner/TestOptions.h >@@ -46,6 +46,7 @@ struct TestOptions { > bool useCharacterSelectionGranularity { false }; > bool enableAttachmentElement { false }; > bool enableIntersectionObserver { false }; >+ bool enableMenuItemElement { false }; > bool enableModernMediaControls { true }; > bool enablePointerLock { false }; > bool enableCredentialManagement { false }; >@@ -73,6 +74,7 @@ struct TestOptions { > || useCharacterSelectionGranularity != options.useCharacterSelectionGranularity > || enableAttachmentElement != options.enableAttachmentElement > || enableIntersectionObserver != options.enableIntersectionObserver >+ || enableMenuItemElement != options.enableMenuItemElement > || enableModernMediaControls != options.enableModernMediaControls > || enablePointerLock != options.enablePointerLock > || enableCredentialManagement != options.enableCredentialManagement >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 469d33c36c6e148c16af8d4b3693e8f23f5bfb2b..14a153703225eca5dc5a6b2588c17da6d7868971 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2017-11-02 Aishwarya Nirmal <anirmal@apple.com> >+ >+ [Touch Bar Web API] Add support for menuitem tag >+ https://bugs.webkit.org/show_bug.cgi?id=179020 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This test ensures that the menuitem element is recognized when >+ its runtime feature is turned on. >+ >+ * fast/html/menuitem-element-expected.txt: Added. >+ * fast/html/menuitem-element.html: Added. >+ > 2017-10-30 Matt Lewis <jlewis3@apple.com> > > Rebaselined imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw-manual.https.html for iOS. >diff --git a/LayoutTests/fast/html/menuitem-element-expected.txt b/LayoutTests/fast/html/menuitem-element-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..1ea3bea070a17e664bf6d215886b5e20baa8cc85 >--- /dev/null >+++ b/LayoutTests/fast/html/menuitem-element-expected.txt >@@ -0,0 +1,11 @@ >+Various tests for the menuitem element. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+MenuItem is recognized: >+PASS document.createElement("menuitem") instanceof HTMLMenuItemElement is true >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/html/menuitem-element.html b/LayoutTests/fast/html/menuitem-element.html >new file mode 100644 >index 0000000000000000000000000000000000000000..06fb1c7c1a62d0d8374bb70aed2836931694a2c0 >--- /dev/null >+++ b/LayoutTests/fast/html/menuitem-element.html >@@ -0,0 +1,16 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ enableMenuItemElement=true ] --> >+<html> >+<head> >+<script src="../../resources/js-test-pre.js"></script> >+</head> >+<body> >+<script> >+description('Various tests for the menuitem element.'); >+ >+debug('MenuItem is recognized:') >+shouldBeTrue('document.createElement("menuitem") instanceof HTMLMenuItemElement'); >+ >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 179020
:
325362
|
325364
|
325368
|
325370
|
325371
|
325373
|
325391
|
325398
|
325401
|
325404
|
325406
|
325482
|
325501
|
325633
|
325635
|
325768
|
325776
|
325778
| 325779 |
325795