Changeset 285936 in webkit
- Timestamp:
- Nov 17, 2021, 10:46:04 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 17 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/conf/mime.types (modified) (1 diff)
-
LayoutTests/http/tests/model (added)
-
LayoutTests/http/tests/model/UnitBox.usdz (added)
-
LayoutTests/http/tests/model/model-document-expected.txt (added)
-
LayoutTests/http/tests/model/model-document.html (added)
-
LayoutTests/platform/mac-wk1/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Sources.txt (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (5 diffs)
-
Source/WebCore/dom/DOMImplementation.cpp (modified) (3 diffs)
-
Source/WebCore/dom/Document.h (modified) (2 diffs)
-
Source/WebCore/html/ModelDocument.cpp (added)
-
Source/WebCore/html/ModelDocument.h (added)
-
Source/WebCore/page/RuntimeEnabledFeatures.h (modified) (2 diffs)
-
Source/WebCore/platform/MIMETypeRegistry.cpp (modified) (2 diffs)
-
Source/WebCore/platform/MIMETypeRegistry.h (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285928 r285936 1 2021-11-17 Dean Jackson <dino@apple.com> 2 3 Add ModelDocument for directly showing content that can be handled by <model> 4 https://bugs.webkit.org/show_bug.cgi?id=233057 5 rdar://85265880 6 7 Reviewed by Darin Adler. 8 9 New test for ModelDocument. 10 11 * http/conf/mime.types: Configure the testing Apache server to serve USDZ files 12 with the correct MIME type. 13 * http/tests/model/UnitBox.usdz: Sample file. 14 * http/tests/model/model-document-expected.txt: Added. 15 * http/tests/model/model-document.html: New test for a ModelDocument. 16 1 17 2021-11-17 Youenn Fablet <youenn@apple.com> 2 18 -
trunk/LayoutTests/http/conf/mime.types
r271939 r285936 516 516 model/vnd.parasolid.transmit.binary 517 517 model/vnd.parasolid.transmit.text 518 model/vnd.usdz+zip usdz 518 519 model/vnd.vtu 519 520 model/vrml wrl vrml -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r285805 r285936 48 48 css-dark-mode [ Skip ] 49 49 model-element [ Skip ] 50 http/tests/model [ Skip ] 50 51 51 52 # Media Stream API testing is not supported for WK1 yet. -
trunk/LayoutTests/platform/mac/TestExpectations
r285727 r285936 1714 1714 [ Catalina Mojave BigSur ] webaudio/decode-audio-data-webm-opus-resample.html [ Skip ] 1715 1715 [ Catalina Mojave BigSur ] webaudio/decode-audio-data-webm-vorbis.html [ Skip ] 1716 [ Catalina Mojave BigSur ] http/tests/model/model-document.html [ Skip ] 1716 1717 1717 1718 webkit.org/b/214422 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/suspend-after-construct.html [ Pass Failure ] -
trunk/LayoutTests/platform/win/TestExpectations
r285857 r285936 132 132 fast/harness/platform-layer-tree-as-text.html [ Skip ] 133 133 model-element/model-element-graphics-layers-opacity.html [ Skip ] 134 135 # Apple Cocoa only for the moment. 136 http/tests/model [ Skip ] 134 137 135 138 # color-filters are off by default -
trunk/Source/WTF/ChangeLog
r285910 r285936 1 2021-11-17 Dean Jackson <dino@apple.com> 2 3 Add ModelDocument for directly showing content that can be handled by <model> 4 https://bugs.webkit.org/show_bug.cgi?id=233057 5 rdar://85265880 6 7 Reviewed by Darin Adler. 8 9 Add a experimental feature: ModelDocumentEnabled 10 for loading content that can be handled by <model>. 11 12 * Scripts/Preferences/WebPreferencesExperimental.yaml: 13 1 14 2021-11-16 Devin Rousso <drousso@apple.com> 2 15 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r285575 r285936 895 895 default: false 896 896 897 ModelDocumentEnabled: 898 type: bool 899 humanReadableName: "HTML <model> elements for stand-alone document" 900 humanReadableDescription: "HTML <model> element for model documents" 901 condition: ENABLE(MODEL_ELEMENT) 902 webcoreBinding: RuntimeEnabledFeatures 903 defaultValue: 904 WebKitLegacy: 905 default: false 906 WebKit: 907 "ENABLE(SEPARATED_MODEL)": true 908 default: false 909 897 910 ModelElementEnabled: 898 911 type: bool -
trunk/Source/WebCore/ChangeLog
r285935 r285936 1 2021-11-17 Dean Jackson <dino@apple.com> 2 3 Add ModelDocument for directly showing content that can be handled by <model> 4 https://bugs.webkit.org/show_bug.cgi?id=233057 5 rdar://85265880 6 7 Reviewed by Darin Adler. 8 9 Add a new ModelDocument class that is created when we encounter a MIME-type that 10 can be handled by the <model> element. 11 12 Test: http/tests/model/model-document.html 13 14 * Sources.txt: 15 * WebCore.xcodeproj/project.pbxproj: Add new files. 16 17 * dom/DOMImplementation.cpp: 18 (WebCore::DOMImplementation::createDocument): Create a ModelDocument when we 19 see a MIME-type that <model> can support. 20 21 * dom/Document.h: Add a new ModelDocumentClass which meant I also had to 22 increase the sizeof DocumentClassFlags. 23 (WebCore::Document::isModelDocument const): 24 25 * html/ModelDocument.cpp: Added. 26 (WebCore::ModelDocumentParser::createDocumentStructure): 27 (WebCore::ModelDocumentParser::appendBytes): 28 (WebCore::ModelDocumentParser::finish): 29 (WebCore::ModelDocument::ModelDocument): 30 (WebCore::ModelDocument::createParser): 31 * html/ModelDocument.h: Added. 32 (isType): 33 34 * platform/MIMETypeRegistry.cpp: Add isSupportedModelMIMEType and test for it 35 in canShowMIMEType. 36 (WebCore::MIMETypeRegistry::canShowMIMEType): 37 (WebCore::MIMETypeRegistry::isSupportedModelMIMEType): 38 * platform/MIMETypeRegistry.h: 39 1 40 2021-11-17 Commit Queue <commit-queue@webkit.org> 2 41 -
trunk/Source/WebCore/Sources.txt
r285822 r285936 1294 1294 html/MediaElementSession.cpp 1295 1295 html/MediaFragmentURIParser.cpp 1296 html/ModelDocument.cpp 1296 1297 html/MonthInputType.cpp 1297 1298 html/NumberInputType.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r285916 r285936 944 944 313BCE1C235E3BE500FC39E5 /* ElementContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 313BCE1B235E3BDB00FC39E5 /* ElementContext.h */; settings = {ATTRIBUTES = (Private, ); }; }; 945 945 313DE87023A96973008FC47B /* GraphicsContextGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 313DE86F23A96967008FC47B /* GraphicsContextGL.h */; settings = {ATTRIBUTES = (Private, ); }; }; 946 313E79EA273C86B80097F905 /* ModelDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 313E79E9273C86B80097F905 /* ModelDocument.h */; }; 946 947 3140379B124BEA7F00AF40E4 /* WebCoreMotionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; 947 948 3140379D124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31403799124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h */; }; … … 7903 7904 313DE86D23A96966008FC47B /* GraphicsContextGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGL.cpp; sourceTree = "<group>"; }; 7904 7905 313DE86F23A96967008FC47B /* GraphicsContextGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGL.h; sourceTree = "<group>"; }; 7906 313E79E9273C86B80097F905 /* ModelDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ModelDocument.h; sourceTree = "<group>"; }; 7907 313E79EC273C86E80097F905 /* ModelDocument.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ModelDocument.cpp; sourceTree = "<group>"; }; 7905 7908 31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreMotionManager.h; sourceTree = "<group>"; }; 7906 7909 31403798124BEA7F00AF40E4 /* WebCoreMotionManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreMotionManager.mm; sourceTree = "<group>"; }; … … 18955 18958 isa = PBXGroup; 18956 18959 children = ( 18957 59B5977111086556007159E8 /* jsc */,18958 18960 1A569CE20D7E2B82007C3983 /* objc */, 18959 18961 599E758F11055A1F00D904FA /* Bridge.h */, 18960 18962 1A71D5790F33819000F9CE4E /* IdentifierRep.cpp */, 18961 18963 1A71D57A0F33819000F9CE4E /* IdentifierRep.h */, 18964 59B5977111086556007159E8 /* jsc */, 18962 18965 1A569CEF0D7E2B82007C3983 /* runtime_array.cpp */, 18963 18966 1A569CF00D7E2B82007C3983 /* runtime_array.h */, … … 24896 24899 07A6D1E91491137700051D0C /* MediaFragmentURIParser.cpp */, 24897 24900 07A6D1EA1491137700051D0C /* MediaFragmentURIParser.h */, 24901 313E79EC273C86E80097F905 /* ModelDocument.cpp */, 24902 313E79E9273C86B80097F905 /* ModelDocument.h */, 24898 24903 F55B3D911251F12D003EF269 /* MonthInputType.cpp */, 24899 24904 F55B3D921251F12D003EF269 /* MonthInputType.h */, … … 35214 35219 5715610C234C1CA1008FC7AB /* MockWebAuthenticationConfiguration.h in Headers */, 35215 35220 2DC8D39825F2FE9700CFCBAB /* Model.h in Headers */, 35221 313E79EA273C86B80097F905 /* ModelDocument.h in Headers */, 35216 35222 BC2B41172732F41E00A2D191 /* ModelPlayer.h in Headers */, 35217 35223 BC2B41192732F42900A2D191 /* ModelPlayerClient.h in Headers */, -
trunk/Source/WebCore/dom/DOMImplementation.cpp
r271011 r285936 46 46 #include "PluginData.h" 47 47 #include "PluginDocument.h" 48 #include "RuntimeEnabledFeatures.h" 48 49 #include "SVGDocument.h" 49 50 #include "SVGNames.h" … … 58 59 #include <wtf/StdLibExtras.h> 59 60 61 #if ENABLE(MODEL_ELEMENT) 62 #include "ModelDocument.h" 63 #endif 64 60 65 namespace WebCore { 61 66 … … 161 166 if (MediaPlayer::supportsType(parameters) != MediaPlayer::SupportsType::IsNotSupported) 162 167 return MediaDocument::create(frame, settings, url); 168 #endif 169 170 #if ENABLE(MODEL_ELEMENT) 171 if (MIMETypeRegistry::isUSDMIMEType(contentType) && RuntimeEnabledFeatures::sharedFeatures().modelDocumentEnabled()) 172 return ModelDocument::create(frame, settings, url); 163 173 #endif 164 174 -
trunk/Source/WebCore/dom/Document.h
r285528 r285936 303 303 TextDocumentClass = 1 << 6, 304 304 XMLDocumentClass = 1 << 7, 305 #if ENABLE(MODEL_ELEMENT) 306 ModelDocumentClass = 1 << 8, 307 #endif 305 308 }; 306 using DocumentClassFlags = u nsigned char;309 using DocumentClassFlags = uint16_t; 307 310 308 311 enum class DocumentCompatibilityMode : unsigned char { … … 541 544 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass; } 542 545 bool isTextDocument() const { return m_documentClasses & TextDocumentClass; } 546 #if ENABLE(MODEL_ELEMENT) 547 bool isModelDocument() const { return m_documentClasses & ModelDocumentClass; } 548 #endif 543 549 bool hasSVGRootNode() const; 544 550 virtual bool isFrameSet() const { return false; } -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r285575 r285936 259 259 #endif 260 260 261 #if ENABLE(MODEL_ELEMENT) 262 void setModelDocumentEnabled(bool isEnabled) { m_modelDocumentEnabled = isEnabled; } 263 bool modelDocumentEnabled() const { return m_modelDocumentEnabled; } 264 #endif 265 261 266 private: 262 267 // Never instantiate. … … 399 404 #endif 400 405 406 #if ENABLE(MODEL_ELEMENT) 407 bool m_modelDocumentEnabled { false }; 408 #endif 409 401 410 friend class NeverDestroyed<RuntimeEnabledFeatures>; 402 411 }; -
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
r285635 r285936 659 659 #endif 660 660 661 #if ENABLE(MODEL_ELEMENT) 662 if (isSupportedModelMIMEType(mimeType)) 663 return true; 664 #endif 665 661 666 if (startsWithLettersIgnoringASCIICase(mimeType, "text/")) 662 667 return !isUnsupportedTextMIMEType(mimeType); … … 687 692 static constexpr SortedArraySet usdMIMETypeSet { usdMIMETypeArray }; 688 693 return usdMIMETypeSet.contains(mimeType); 694 } 695 696 bool MIMETypeRegistry::isSupportedModelMIMEType(const String& mimeType) 697 { 698 return MIMETypeRegistry::isUSDMIMEType(mimeType); 689 699 } 690 700 -
trunk/Source/WebCore/platform/MIMETypeRegistry.h
r285635 r285936 109 109 WEBCORE_EXPORT static bool isUSDMIMEType(const String& mimeType); 110 110 111 WEBCORE_EXPORT static bool isSupportedModelMIMEType(const String& mimeType); 112 111 113 // Check to see if a MIME type is suitable for being shown inside a page. 112 114 // Returns true if any of isSupportedImageMIMEType(), isSupportedNonImageMIMEType(), -
trunk/Source/WebKit/ChangeLog
r285922 r285936 1 2021-11-17 Dean Jackson <dino@apple.com> 2 3 Add ModelDocument for directly showing content that can be handled by <model> 4 https://bugs.webkit.org/show_bug.cgi?id=233057 5 rdar://85265880 6 7 Reviewed by Darin Adler. 8 9 We don't need to use WKUSDPreviewView if we have ModelDocument. 10 11 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: 12 (-[WKWebViewContentProviderRegistry initWithConfiguration:]): 13 1 14 2021-11-17 Antoine Quint <graouts@webkit.org> 2 15 -
trunk/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
r285635 r285936 55 55 #endif 56 56 57 #if USE(SYSTEM_PREVIEW) && !HAVE(UIKIT_WEBKIT_INTERNALS) 57 #if USE(SYSTEM_PREVIEW) && !HAVE(UIKIT_WEBKIT_INTERNALS) && !ENABLE(MODEL_ELEMENT) 58 58 if (configuration._systemPreviewEnabled) { 59 59 for (auto& type : WebCore::MIMETypeRegistry::usdMIMETypes())
Note:
See TracChangeset
for help on using the changeset viewer.