Title: [269984] trunk/Source/WebCore
Revision
269984
Author
[email protected]
Date
2020-11-18 14:04:09 -0800 (Wed, 18 Nov 2020)

Log Message

Move <model> code under Modules/model-element
https://bugs.webkit.org/show_bug.cgi?id=219104

Reviewed by Dean Jackson.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* Headers.cmake:
* Modules/model-element/HTMLModelElement.cpp: Renamed from Source/WebCore/html/HTMLModelElement.cpp.
* Modules/model-element/HTMLModelElement.h: Renamed from Source/WebCore/html/HTMLModelElement.h.
* Modules/model-element/HTMLModelElement.idl: Renamed from Source/WebCore/html/HTMLModelElement.idl.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (269983 => 269984)


--- trunk/Source/WebCore/CMakeLists.txt	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/CMakeLists.txt	2020-11-18 22:04:09 UTC (rev 269984)
@@ -48,6 +48,7 @@
     "${WEBCORE_DIR}/Modules/mediasource"
     "${WEBCORE_DIR}/Modules/mediastream"
     "${WEBCORE_DIR}/Modules/mediastream/libwebrtc"
+    "${WEBCORE_DIR}/Modules/model-element"
     "${WEBCORE_DIR}/Modules/navigatorcontentutils"
     "${WEBCORE_DIR}/Modules/notifications"
     "${WEBCORE_DIR}/Modules/paymentrequest"
@@ -198,6 +199,7 @@
     Modules/mediacapabilities
     Modules/mediarecorder
     Modules/mediastream
+    Modules/model-element
     Modules/notifications
     Modules/paymentrequest
     Modules/quota
@@ -417,6 +419,8 @@
     Modules/mediastream/RTCStatsReport.idl
     Modules/mediastream/RTCTrackEvent.idl
 
+    Modules/model-element/HTMLModelElement.idl
+
     Modules/notifications/Notification.idl
     Modules/notifications/NotificationPermission.idl
     Modules/notifications/NotificationPermissionCallback.idl
@@ -969,7 +973,6 @@
     html/HTMLMetaElement.idl
     html/HTMLMeterElement.idl
     html/HTMLModElement.idl
-    html/HTMLModelElement.idl
     html/HTMLOListElement.idl
     html/HTMLObjectElement.idl
     html/HTMLOptGroupElement.idl

Modified: trunk/Source/WebCore/ChangeLog (269983 => 269984)


--- trunk/Source/WebCore/ChangeLog	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/ChangeLog	2020-11-18 22:04:09 UTC (rev 269984)
@@ -1,3 +1,20 @@
+2020-11-18  Antoine Quint  <[email protected]>
+
+        Move <model> code under Modules/model-element
+        https://bugs.webkit.org/show_bug.cgi?id=219104
+
+        Reviewed by Dean Jackson.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources.make:
+        * Headers.cmake:
+        * Modules/model-element/HTMLModelElement.cpp: Renamed from Source/WebCore/html/HTMLModelElement.cpp.
+        * Modules/model-element/HTMLModelElement.h: Renamed from Source/WebCore/html/HTMLModelElement.h.
+        * Modules/model-element/HTMLModelElement.idl: Renamed from Source/WebCore/html/HTMLModelElement.idl.
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2020-11-18  Chris Dumez  <[email protected]>
 
         [iOS] beforeunload event does not fire in MobileSafari

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (269983 => 269984)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2020-11-18 22:04:09 UTC (rev 269984)
@@ -250,6 +250,7 @@
 $(PROJECT_DIR)/Modules/mediastream/RTCSignalingState.idl
 $(PROJECT_DIR)/Modules/mediastream/RTCStatsReport.idl
 $(PROJECT_DIR)/Modules/mediastream/RTCTrackEvent.idl
+$(PROJECT_DIR)/Modules/model-element/HTMLModelElement.idl
 $(PROJECT_DIR)/Modules/notifications/Notification.idl
 $(PROJECT_DIR)/Modules/notifications/NotificationPermission.idl
 $(PROJECT_DIR)/Modules/notifications/NotificationPermissionCallback.idl
@@ -898,7 +899,6 @@
 $(PROJECT_DIR)/html/HTMLMetaElement.idl
 $(PROJECT_DIR)/html/HTMLMeterElement.idl
 $(PROJECT_DIR)/html/HTMLModElement.idl
-$(PROJECT_DIR)/html/HTMLModelElement.idl
 $(PROJECT_DIR)/html/HTMLOListElement.idl
 $(PROJECT_DIR)/html/HTMLObjectElement.idl
 $(PROJECT_DIR)/html/HTMLOptGroupElement.idl

Modified: trunk/Source/WebCore/DerivedSources.make (269983 => 269984)


--- trunk/Source/WebCore/DerivedSources.make	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/DerivedSources.make	2020-11-18 22:04:09 UTC (rev 269984)
@@ -274,6 +274,7 @@
     $(WebCore)/Modules/mediastream/RTCSignalingState.idl \
     $(WebCore)/Modules/mediastream/RTCStatsReport.idl \
     $(WebCore)/Modules/mediastream/RTCTrackEvent.idl \
+    $(WebCore)/Modules/model-element/HTMLModelElement.idl \
     $(WebCore)/Modules/notifications/Notification.idl \
     $(WebCore)/Modules/notifications/NotificationPermission.idl \
     $(WebCore)/Modules/notifications/NotificationPermissionCallback.idl \
@@ -844,7 +845,6 @@
     $(WebCore)/html/HTMLMetaElement.idl \
     $(WebCore)/html/HTMLMeterElement.idl \
     $(WebCore)/html/HTMLModElement.idl \
-    $(WebCore)/html/HTMLModelElement.idl \
     $(WebCore)/html/HTMLOListElement.idl \
     $(WebCore)/html/HTMLObjectElement.idl \
     $(WebCore)/html/HTMLOptGroupElement.idl \

Modified: trunk/Source/WebCore/Headers.cmake (269983 => 269984)


--- trunk/Source/WebCore/Headers.cmake	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/Headers.cmake	2020-11-18 22:04:09 UTC (rev 269984)
@@ -104,6 +104,8 @@
     Modules/mediastream/UserMediaController.h
     Modules/mediastream/UserMediaRequest.h
 
+    Modules/model-element/HTMLModelElement.h
+
     Modules/notifications/Notification.h
     Modules/notifications/NotificationClient.h
     Modules/notifications/NotificationController.h
@@ -639,7 +641,6 @@
     html/HTMLMenuItemElement.h
     html/HTMLMetaElement.h
     html/HTMLModElement.h
-    html/HTMLModelElement.h
     html/HTMLOListElement.h
     html/HTMLObjectElement.h
     html/HTMLOptGroupElement.h

Copied: trunk/Source/WebCore/Modules/model-element/HTMLModelElement.cpp (from rev 269983, trunk/Source/WebCore/html/HTMLModelElement.cpp) (0 => 269984)


--- trunk/Source/WebCore/Modules/model-element/HTMLModelElement.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/model-element/HTMLModelElement.cpp	2020-11-18 22:04:09 UTC (rev 269984)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "HTMLModelElement.h"
+
+#if ENABLE(MODEL_ELEMENT)
+
+#include "ElementChildIterator.h"
+#include "HTMLNames.h"
+#include "HTMLSourceElement.h"
+#include <wtf/IsoMallocInlines.h>
+#include <wtf/URL.h>
+
+namespace WebCore {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(HTMLModelElement);
+
+HTMLModelElement::HTMLModelElement(const QualifiedName& tagName, Document& document)
+    : HTMLElement(tagName, document)
+{
+}
+
+HTMLModelElement::~HTMLModelElement()
+{
+}
+
+Ref<HTMLModelElement> HTMLModelElement::create(const QualifiedName& tagName, Document& document)
+{
+    return adoptRef(*new HTMLModelElement(tagName, document));
+}
+
+void HTMLModelElement::sourcesChanged()
+{
+    if (!document().hasBrowsingContext()) {
+        setSourceURL(URL());
+        return;
+    }
+
+    for (auto& element : childrenOfType<HTMLSourceElement>(*this)) {
+        // FIXME: for now we use the first valid URL without looking at the mime-type.
+        auto url = ""
+        if (url.isValid()) {
+            setSourceURL(url);
+            return;
+        }
+    }
+
+    setSourceURL(URL());
+}
+
+void HTMLModelElement::setSourceURL(const URL& url)
+{
+    // FIXME: actually do something with that URL now.
+    m_sourceURL = url;
+}
+
+void HTMLModelElement::didMoveToNewDocument(Document& oldDocument, Document& newDocument)
+{
+    HTMLElement::didMoveToNewDocument(oldDocument, newDocument);
+    sourcesChanged();
+}
+
+}
+
+#endif // ENABLE(MODEL_ELEMENT)

Copied: trunk/Source/WebCore/Modules/model-element/HTMLModelElement.h (from rev 269983, trunk/Source/WebCore/html/HTMLModelElement.h) (0 => 269984)


--- trunk/Source/WebCore/Modules/model-element/HTMLModelElement.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/model-element/HTMLModelElement.h	2020-11-18 22:04:09 UTC (rev 269984)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(MODEL_ELEMENT)
+
+#include "HTMLElement.h"
+
+namespace WebCore {
+
+class HTMLModelElement final : public HTMLElement {
+    WTF_MAKE_ISO_ALLOCATED(HTMLModelElement);
+public:
+    static Ref<HTMLModelElement> create(const QualifiedName&, Document&);
+    virtual ~HTMLModelElement();
+
+    void sourcesChanged();
+    const URL& currentSrc() const { return m_sourceURL; }
+
+private:
+    HTMLModelElement(const QualifiedName&, Document&);
+
+    void didMoveToNewDocument(Document& oldDocument, Document& newDocument) final;
+
+    void setSourceURL(const URL&);
+
+    URL m_sourceURL;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MODEL_ELEMENT)

Copied: trunk/Source/WebCore/Modules/model-element/HTMLModelElement.idl (from rev 269983, trunk/Source/WebCore/html/HTMLModelElement.idl) (0 => 269984)


--- trunk/Source/WebCore/Modules/model-element/HTMLModelElement.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/model-element/HTMLModelElement.idl	2020-11-18 22:04:09 UTC (rev 269984)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=MODEL_ELEMENT,
+    EnabledBySetting=ModelElement,
+    Exposed=Window,
+] interface HTMLModelElement : HTMLElement {
+    [URL] readonly attribute USVString currentSrc;
+};

Modified: trunk/Source/WebCore/Sources.txt (269983 => 269984)


--- trunk/Source/WebCore/Sources.txt	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/Sources.txt	2020-11-18 22:04:09 UTC (rev 269984)
@@ -176,6 +176,7 @@
 Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverTransformBackend.cpp
 Modules/mediastream/libwebrtc/LibWebRTCRtpSenderTransformBackend.cpp
 Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.cpp
+Modules/model-element/HTMLModelElement.cpp
 Modules/notifications/Notification.cpp
 Modules/notifications/NotificationController.cpp
 Modules/paymentrequest/MerchantValidationEvent.cpp
@@ -1187,7 +1188,6 @@
 html/HTMLMetaElement.cpp
 html/HTMLMeterElement.cpp
 html/HTMLModElement.cpp
-html/HTMLModelElement.cpp
 html/HTMLNameCollection.cpp
 html/HTMLOListElement.cpp
 html/HTMLObjectElement.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269983 => 269984)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-11-18 22:04:09 UTC (rev 269984)
@@ -5137,9 +5137,9 @@
 		E4D33F44252C50E200837D05 /* LayoutIntegrationLineIteratorLegacyPath.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D33F43252C50E200837D05 /* LayoutIntegrationLineIteratorLegacyPath.h */; };
 		E4D33F46252C50FC00837D05 /* LayoutIntegrationLineIteratorModernPath.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D33F45252C50FB00837D05 /* LayoutIntegrationLineIteratorModernPath.h */; };
 		E4D58EB517B4DBDC00CBDCA8 /* StyleResolveForDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D58EB317B4DBDC00CBDCA8 /* StyleResolveForDocument.h */; };
-		E4D68EB517B4DBDC00CBDCA8 /* StyleResolveForFontRaw.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D68EB317B4DBDC00CBDCA8 /* StyleResolveForFontRaw.h */; };
 		E4D58EB917B4ED8900CBDCA8 /* StyleFontSizeFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D58EB717B4ED8900CBDCA8 /* StyleFontSizeFunctions.h */; };
 		E4D58EBB17B8F12800CBDCA8 /* ElementTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D58EBA17B8F12800CBDCA8 /* ElementTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		E4D68EB517B4DBDC00CBDCA8 /* StyleResolveForFontRaw.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D68EB317B4DBDC00CBDCA8 /* StyleResolveForFontRaw.h */; };
 		E4D988B417BFD1F60084FB88 /* TextNodeTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = E4D988B317BFD1F60084FB88 /* TextNodeTraversal.h */; };
 		E4DACE6A1D12E10B0075980F /* StylePendingResources.h in Headers */ = {isa = PBXBuildFile; fileRef = E4DACE691D12E10B0075980F /* StylePendingResources.h */; };
 		E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = E4DEAA1617A93DC3000E0430 /* StyleTreeResolver.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -16289,11 +16289,11 @@
 		E4D33F45252C50FB00837D05 /* LayoutIntegrationLineIteratorModernPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationLineIteratorModernPath.h; sourceTree = "<group>"; };
 		E4D58EB217B4DBDC00CBDCA8 /* StyleResolveForDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleResolveForDocument.cpp; sourceTree = "<group>"; };
 		E4D58EB317B4DBDC00CBDCA8 /* StyleResolveForDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleResolveForDocument.h; sourceTree = "<group>"; };
-		E4D68EB217B4DBDC00CBDCA8 /* StyleResolveForFontRaw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleResolveForFontRaw.cpp; sourceTree = "<group>"; };
-		E4D68EB317B4DBDC00CBDCA8 /* StyleResolveForFontRaw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleResolveForFontRaw.h; sourceTree = "<group>"; };
 		E4D58EB617B4ED8900CBDCA8 /* StyleFontSizeFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleFontSizeFunctions.cpp; sourceTree = "<group>"; };
 		E4D58EB717B4ED8900CBDCA8 /* StyleFontSizeFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleFontSizeFunctions.h; sourceTree = "<group>"; };
 		E4D58EBA17B8F12800CBDCA8 /* ElementTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementTraversal.h; sourceTree = "<group>"; };
+		E4D68EB217B4DBDC00CBDCA8 /* StyleResolveForFontRaw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleResolveForFontRaw.cpp; sourceTree = "<group>"; };
+		E4D68EB317B4DBDC00CBDCA8 /* StyleResolveForFontRaw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleResolveForFontRaw.h; sourceTree = "<group>"; };
 		E4D988B317BFD1F60084FB88 /* TextNodeTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextNodeTraversal.h; sourceTree = "<group>"; };
 		E4D988B517BFEB210084FB88 /* TextNodeTraversal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextNodeTraversal.cpp; sourceTree = "<group>"; };
 		E4DACE691D12E10B0075980F /* StylePendingResources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StylePendingResources.h; sourceTree = "<group>"; };
@@ -22449,6 +22449,16 @@
 			path = macOS;
 			sourceTree = "<group>";
 		};
+		71F849CC2565AB7E008C37F2 /* model-element */ = {
+			isa = PBXGroup;
+			children = (
+				71A3D1802562B8250064E2A6 /* HTMLModelElement.cpp */,
+				71A3D17D2562B8240064E2A6 /* HTMLModelElement.h */,
+				71A3D17F2562B8240064E2A6 /* HTMLModelElement.idl */,
+			);
+			path = "model-element";
+			sourceTree = "<group>";
+		};
 		7C011F3C24FAD360005BEF10 /* SettingsTemplates */ = {
 			isa = PBXGroup;
 			children = (
@@ -23308,9 +23318,6 @@
 				A4544248119B3661009BE912 /* HTMLMeterElement.cpp */,
 				A4544249119B3661009BE912 /* HTMLMeterElement.h */,
 				A71A70C911AFB02000989D6D /* HTMLMeterElement.idl */,
-				71A3D1802562B8250064E2A6 /* HTMLModelElement.cpp */,
-				71A3D17D2562B8240064E2A6 /* HTMLModelElement.h */,
-				71A3D17F2562B8240064E2A6 /* HTMLModelElement.idl */,
 				A8CFF79F0A156978000A4234 /* HTMLModElement.cpp */,
 				A8CFF79D0A156978000A4234 /* HTMLModElement.h */,
 				1AE2AB070A1CE5CF00B42B25 /* HTMLModElement.idl */,
@@ -23643,6 +23650,7 @@
 				CDDDEA212538CD3500A1300C /* mediasession */,
 				B1A942DD15B5CE2200D525D1 /* mediasource */,
 				07221B4617CEC32700848E51 /* mediastream */,
+				71F849CC2565AB7E008C37F2 /* model-element */,
 				71D6AA391DA4EAF700B23969 /* modern-media-controls */,
 				333F703D0FB49C16008E12A6 /* notifications */,
 				A1F76B0E1F44C0CF0014C318 /* paymentrequest */,

Deleted: trunk/Source/WebCore/html/HTMLModelElement.cpp (269983 => 269984)


--- trunk/Source/WebCore/html/HTMLModelElement.cpp	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/html/HTMLModelElement.cpp	2020-11-18 22:04:09 UTC (rev 269984)
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "HTMLModelElement.h"
-
-#if ENABLE(MODEL_ELEMENT)
-
-#include "HTMLNames.h"
-#include "HTMLSourceElement.h"
-#include <wtf/IsoMallocInlines.h>
-#include <wtf/URL.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(HTMLModelElement);
-
-HTMLModelElement::HTMLModelElement(const QualifiedName& tagName, Document& document)
-    : HTMLElement(tagName, document)
-{
-}
-
-HTMLModelElement::~HTMLModelElement()
-{
-}
-
-Ref<HTMLModelElement> HTMLModelElement::create(const QualifiedName& tagName, Document& document)
-{
-    return adoptRef(*new HTMLModelElement(tagName, document));
-}
-
-void HTMLModelElement::sourcesChanged()
-{
-    if (!document().hasBrowsingContext()) {
-        setSourceURL(URL());
-        return;
-    }
-
-    for (auto& element : childrenOfType<HTMLSourceElement>(*this)) {
-        // FIXME: for now we use the first valid URL without looking at the mime-type.
-        auto url = ""
-        if (url.isValid()) {
-            setSourceURL(url);
-            return;
-        }
-    }
-
-    setSourceURL(URL());
-}
-
-void HTMLModelElement::setSourceURL(const URL& url)
-{
-    // FIXME: actually do something with that URL now.
-    m_sourceURL = url;
-}
-
-void HTMLModelElement::didMoveToNewDocument(Document& oldDocument, Document& newDocument)
-{
-    HTMLElement::didMoveToNewDocument(oldDocument, newDocument);
-    sourcesChanged();
-}
-
-}
-
-#endif // ENABLE(MODEL_ELEMENT)

Deleted: trunk/Source/WebCore/html/HTMLModelElement.h (269983 => 269984)


--- trunk/Source/WebCore/html/HTMLModelElement.h	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/html/HTMLModelElement.h	2020-11-18 22:04:09 UTC (rev 269984)
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(MODEL_ELEMENT)
-
-#include "HTMLElement.h"
-
-namespace WebCore {
-
-class HTMLModelElement final : public HTMLElement {
-    WTF_MAKE_ISO_ALLOCATED(HTMLModelElement);
-public:
-    static Ref<HTMLModelElement> create(const QualifiedName&, Document&);
-    virtual ~HTMLModelElement();
-
-    void sourcesChanged();
-    const URL& currentSrc() const { return m_sourceURL; }
-
-private:
-    HTMLModelElement(const QualifiedName&, Document&);
-
-    void didMoveToNewDocument(Document& oldDocument, Document& newDocument) final;
-
-    void setSourceURL(const URL&);
-
-    URL m_sourceURL;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MODEL_ELEMENT)

Deleted: trunk/Source/WebCore/html/HTMLModelElement.idl (269983 => 269984)


--- trunk/Source/WebCore/html/HTMLModelElement.idl	2020-11-18 21:57:01 UTC (rev 269983)
+++ trunk/Source/WebCore/html/HTMLModelElement.idl	2020-11-18 22:04:09 UTC (rev 269984)
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    Conditional=MODEL_ELEMENT,
-    EnabledBySetting=ModelElement,
-    Exposed=Window,
-] interface HTMLModelElement : HTMLElement {
-    [URL] readonly attribute USVString currentSrc;
-};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to