Diff
Modified: branches/safari-610.1.17-branch/LayoutTests/ChangeLog (263237 => 263238)
--- branches/safari-610.1.17-branch/LayoutTests/ChangeLog 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/LayoutTests/ChangeLog 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1,58 +1,3 @@
-2020-06-18 Alan Coon <alanc...@apple.com>
-
- Cherry-pick r263128. rdar://problem/64492837
-
- REGRESSION (r262643): DumpRenderTree at com.apple.WebCore: WebCore::Document::prepareCanvasesForDisplayIfNeeded
- https://bugs.webkit.org/show_bug.cgi?id=213221
- rdar://64260400
-
- Reviewed by Simon Fraser.
-
- Source/WebCore:
-
- A Document could still be holding a pointer to an HTMLCanvasElement after the
- canvas had been deleted because the CanvasObserver protocol was disconnected
- too early. The fix is to explicitly clear the canvas from the Document as it
- stops observing.
-
- Test: webgl/preparation-removed-from-document.html
-
- * dom/Document.cpp:
- (WebCore::Document::prepareCanvasesForDisplayIfNeeded): Copy the HashSet to a Vector
- just in case something weird happens to the set during iteration.
- (WebCore::Document::clearCanvasPreparation): Remove the canvas from the list of
- of elements that need preparation.
- * dom/Document.h: Add the new clearCanvasPreparation method.
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Clear the document.
- (WebCore::HTMLCanvasElement::didMoveToNewDocument): Ditto.
- (WebCore::HTMLCanvasElement::removedFromAncestor): Ditto.
-
- LayoutTests:
-
- Test that triggers a rendering on a canvas, then rips it out of
- the document before drawing.
-
- * webgl/preparation-removed-from-document-expected.txt: Added.
- * webgl/preparation-removed-from-document.html: Added.
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 2020-06-16 Dean Jackson <d...@apple.com>
-
- REGRESSION (r262643): DumpRenderTree at com.apple.WebCore: WebCore::Document::prepareCanvasesForDisplayIfNeeded
- https://bugs.webkit.org/show_bug.cgi?id=213221
- rdar://64260400
-
- Reviewed by Simon Fraser.
-
- Test that triggers a rendering on a canvas, then rips it out of
- the document before drawing.
-
- * webgl/preparation-removed-from-document-expected.txt: Added.
- * webgl/preparation-removed-from-document.html: Added.
-
2020-06-15 Megan Gardner <megan_gard...@apple.com>
Text form controls can scroll by 1px when value is the same length as size. No scrolling should happen.
Deleted: branches/safari-610.1.17-branch/LayoutTests/webgl/preparation-removed-from-document-expected.txt (263237 => 263238)
--- branches/safari-610.1.17-branch/LayoutTests/webgl/preparation-removed-from-document-expected.txt 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/LayoutTests/webgl/preparation-removed-from-document-expected.txt 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1 +0,0 @@
-
Deleted: branches/safari-610.1.17-branch/LayoutTests/webgl/preparation-removed-from-document.html (263237 => 263238)
--- branches/safari-610.1.17-branch/LayoutTests/webgl/preparation-removed-from-document.html 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/LayoutTests/webgl/preparation-removed-from-document.html 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<style>
-canvas {
- width: 200px;
- height: 200px;
-}
-</style>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-let canvas;
-
-function startTest()
-{
- canvas = document.createElement("canvas");
- canvas.width = 200;
- canvas.height = 200;
- document.body.appendChild(canvas);
- requestAnimationFrame(updateAndRemoveCanvas);
-}
-
-function updateAndRemoveCanvas()
-{
- let gl = canvas.getContext("webgl");
- gl.clearColor(0, 1, 0, 1);
- gl.clear(gl.COLOR_BUFFER_BIT);
- canvas.remove();
- canvas = null;
- gl = null;
- if (window.GCController)
- GCController.collect();
-
- requestAnimationFrame(finishTest);
-}
-
-function finishTest()
-{
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-window.addEventListener("DOMContentLoaded", startTest, false);
-</script>
Modified: branches/safari-610.1.17-branch/Source/WebCore/ChangeLog (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/ChangeLog 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/ChangeLog 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1,229 +1,3 @@
-2020-06-18 Alan Coon <alanc...@apple.com>
-
- Cherry-pick r263129. rdar://problem/64492826
-
- FileListCreator should only be used for resolving directories
- https://bugs.webkit.org/show_bug.cgi?id=213259
- <rdar://problem/64375709>
-
- Reviewed by David Kilzer.
-
- Depending on whether directories should be resolved, FileListCreator::create would either
- synchronously execute its completion handler then return nullptr or asynchronously dispatch
- its completion handler then return a non-null RefPtr. Interfaces with sometimes-synchronous
- callbacks can be hard to use correctly; e.g., r262962 fixes a problem where
- FileInputType::m_fileListCreator was being modified in an unexpected order.
-
- This patch makes the interface between FileInputType and FileListCreator less error-prone
- and more explicit by renaming FileListCreator to DirectoryFileListCreator, making its job
- solely to create directory FileLists on a background queue, and giving it an explicit start
- member function. For non-directories, FileInputType::filesChosen now bypasses
- DirectoryFileListCreator and directly converts from Vector<FileChooserFileInfo> to FileList.
-
- Covered by existing tests.
-
- * Sources.txt:
- * WebCore.xcodeproj/project.pbxproj:
-
- * html/DirectoryFileListCreator.cpp: Renamed from html/FileListCreator.cpp.
- (WebCore::createFileList): Removed the template and ShouldResolveDirectories parameter.
- (WebCore::DirectoryFileListCreator::DirectoryFileListCreator): Moved the work queue
- dispatching to DirectoryFileListCreator::start.
- (WebCore::DirectoryFileListCreator::start): Added; moved the work queue dispatching here
- from the ctor.
-
- * html/DirectoryFileListCreator.h: Renamed from html/FileListCreator.h.
- (WebCore::DirectoryFileListCreator::create): Stopped performing non-directory creation and
- changed the return value back to Ref<>.
-
- * html/FileInputType.cpp:
- (WebCore::FileInputType::filesChosen): Moved most of the work done in the FileListCreator
- completion handler to didCreateFileList. When !FileInputType::allowsDirectories, used
- Vector::map to convert paths to a Vector<Ref<File>>, used that to create a FileList, then
- called didCreateFileList. Otherwise, created and started a DirectoryFileListCreator that
- calls didCreateFileList in its completion handler.
- (WebCore::FileInputType::didCreateFileList): Added; sets the new file list and icon and
- clears m_directoryFileListCreator.
-
- * html/FileInputType.h:
-
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 2020-06-16 Andy Estes <aes...@apple.com>
-
- FileListCreator should only be used for resolving directories
- https://bugs.webkit.org/show_bug.cgi?id=213259
- <rdar://problem/64375709>
-
- Reviewed by David Kilzer.
-
- Depending on whether directories should be resolved, FileListCreator::create would either
- synchronously execute its completion handler then return nullptr or asynchronously dispatch
- its completion handler then return a non-null RefPtr. Interfaces with sometimes-synchronous
- callbacks can be hard to use correctly; e.g., r262962 fixes a problem where
- FileInputType::m_fileListCreator was being modified in an unexpected order.
-
- This patch makes the interface between FileInputType and FileListCreator less error-prone
- and more explicit by renaming FileListCreator to DirectoryFileListCreator, making its job
- solely to create directory FileLists on a background queue, and giving it an explicit start
- member function. For non-directories, FileInputType::filesChosen now bypasses
- DirectoryFileListCreator and directly converts from Vector<FileChooserFileInfo> to FileList.
-
- Covered by existing tests.
-
- * Sources.txt:
- * WebCore.xcodeproj/project.pbxproj:
-
- * html/DirectoryFileListCreator.cpp: Renamed from html/FileListCreator.cpp.
- (WebCore::createFileList): Removed the template and ShouldResolveDirectories parameter.
- (WebCore::DirectoryFileListCreator::DirectoryFileListCreator): Moved the work queue
- dispatching to DirectoryFileListCreator::start.
- (WebCore::DirectoryFileListCreator::start): Added; moved the work queue dispatching here
- from the ctor.
-
- * html/DirectoryFileListCreator.h: Renamed from html/FileListCreator.h.
- (WebCore::DirectoryFileListCreator::create): Stopped performing non-directory creation and
- changed the return value back to Ref<>.
-
- * html/FileInputType.cpp:
- (WebCore::FileInputType::filesChosen): Moved most of the work done in the FileListCreator
- completion handler to didCreateFileList. When !FileInputType::allowsDirectories, used
- Vector::map to convert paths to a Vector<Ref<File>>, used that to create a FileList, then
- called didCreateFileList. Otherwise, created and started a DirectoryFileListCreator that
- calls didCreateFileList in its completion handler.
- (WebCore::FileInputType::didCreateFileList): Added; sets the new file list and icon and
- clears m_directoryFileListCreator.
-
- * html/FileInputType.h:
-
-2020-06-18 Alan Coon <alanc...@apple.com>
-
- Cherry-pick r263128. rdar://problem/64492837
-
- REGRESSION (r262643): DumpRenderTree at com.apple.WebCore: WebCore::Document::prepareCanvasesForDisplayIfNeeded
- https://bugs.webkit.org/show_bug.cgi?id=213221
- rdar://64260400
-
- Reviewed by Simon Fraser.
-
- Source/WebCore:
-
- A Document could still be holding a pointer to an HTMLCanvasElement after the
- canvas had been deleted because the CanvasObserver protocol was disconnected
- too early. The fix is to explicitly clear the canvas from the Document as it
- stops observing.
-
- Test: webgl/preparation-removed-from-document.html
-
- * dom/Document.cpp:
- (WebCore::Document::prepareCanvasesForDisplayIfNeeded): Copy the HashSet to a Vector
- just in case something weird happens to the set during iteration.
- (WebCore::Document::clearCanvasPreparation): Remove the canvas from the list of
- of elements that need preparation.
- * dom/Document.h: Add the new clearCanvasPreparation method.
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Clear the document.
- (WebCore::HTMLCanvasElement::didMoveToNewDocument): Ditto.
- (WebCore::HTMLCanvasElement::removedFromAncestor): Ditto.
-
- LayoutTests:
-
- Test that triggers a rendering on a canvas, then rips it out of
- the document before drawing.
-
- * webgl/preparation-removed-from-document-expected.txt: Added.
- * webgl/preparation-removed-from-document.html: Added.
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 2020-06-16 Dean Jackson <d...@apple.com>
-
- REGRESSION (r262643): DumpRenderTree at com.apple.WebCore: WebCore::Document::prepareCanvasesForDisplayIfNeeded
- https://bugs.webkit.org/show_bug.cgi?id=213221
- rdar://64260400
-
- Reviewed by Simon Fraser.
-
- A Document could still be holding a pointer to an HTMLCanvasElement after the
- canvas had been deleted because the CanvasObserver protocol was disconnected
- too early. The fix is to explicitly clear the canvas from the Document as it
- stops observing.
-
- Test: webgl/preparation-removed-from-document.html
-
- * dom/Document.cpp:
- (WebCore::Document::prepareCanvasesForDisplayIfNeeded): Copy the HashSet to a Vector
- just in case something weird happens to the set during iteration.
- (WebCore::Document::clearCanvasPreparation): Remove the canvas from the list of
- of elements that need preparation.
- * dom/Document.h: Add the new clearCanvasPreparation method.
-
- * html/HTMLCanvasElement.cpp:
- (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Clear the document.
- (WebCore::HTMLCanvasElement::didMoveToNewDocument): Ditto.
- (WebCore::HTMLCanvasElement::removedFromAncestor): Ditto.
-
-2020-06-18 Alan Coon <alanc...@apple.com>
-
- Cherry-pick r263119. rdar://problem/64492834
-
- Web Inspector: replace completion handler with a function in interception.
- https://bugs.webkit.org/show_bug.cgi?id=213252
-
- Patch by Pavel Feldman <pavel.feld...@gmail.com> on 2020-06-16
- Reviewed by Devin Rousso.
-
- Don't use a `CompletionHandler` as it asserts that it's been called when it's destroyed.
- Both `Network.interceptRequestWithResponse` and `Network.interceptRequestWithError` essentially
- "skip" the network pipeline, so the `CompletionHandler` is not invoked for those commands.
-
- * inspector/InspectorInstrumentation.cpp:
- (WebCore::InspectorInstrumentation::interceptRequestImpl):
- * inspector/InspectorInstrumentation.h:
- (WebCore::InspectorInstrumentation::interceptRequest):
- * inspector/InspectorInstrumentationWebKit.cpp:
- (WebCore::InspectorInstrumentationWebKit::interceptRequestInternal):
- * inspector/InspectorInstrumentationWebKit.h:
- (WebCore::InspectorInstrumentationWebKit::interceptRequest):
- * inspector/agents/InspectorNetworkAgent.cpp:
- (WebCore::InspectorNetworkAgent::interceptRequest):
- (WebCore::InspectorNetworkAgent::interceptRequestWithResponse):
- (WebCore::InspectorNetworkAgent::interceptRequestWithError):
- * inspector/agents/InspectorNetworkAgent.h:
- (WebCore::InspectorNetworkAgent::PendingInterceptRequest::PendingInterceptRequest):
- (WebCore::InspectorNetworkAgent::PendingInterceptRequest::continueAsHandled):
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 2020-06-16 Pavel Feldman <pavel.feld...@gmail.com>
-
- Web Inspector: replace completion handler with a function in interception.
- https://bugs.webkit.org/show_bug.cgi?id=213252
-
- Reviewed by Devin Rousso.
-
- Don't use a `CompletionHandler` as it asserts that it's been called when it's destroyed.
- Both `Network.interceptRequestWithResponse` and `Network.interceptRequestWithError` essentially
- "skip" the network pipeline, so the `CompletionHandler` is not invoked for those commands.
-
- * inspector/InspectorInstrumentation.cpp:
- (WebCore::InspectorInstrumentation::interceptRequestImpl):
- * inspector/InspectorInstrumentation.h:
- (WebCore::InspectorInstrumentation::interceptRequest):
- * inspector/InspectorInstrumentationWebKit.cpp:
- (WebCore::InspectorInstrumentationWebKit::interceptRequestInternal):
- * inspector/InspectorInstrumentationWebKit.h:
- (WebCore::InspectorInstrumentationWebKit::interceptRequest):
- * inspector/agents/InspectorNetworkAgent.cpp:
- (WebCore::InspectorNetworkAgent::interceptRequest):
- (WebCore::InspectorNetworkAgent::interceptRequestWithResponse):
- (WebCore::InspectorNetworkAgent::interceptRequestWithError):
- * inspector/agents/InspectorNetworkAgent.h:
- (WebCore::InspectorNetworkAgent::PendingInterceptRequest::PendingInterceptRequest):
- (WebCore::InspectorNetworkAgent::PendingInterceptRequest::continueAsHandled):
-
2020-06-15 Megan Gardner <megan_gard...@apple.com>
Text form controls can scroll by 1px when value is the same length as size. No scrolling should happen.
Modified: branches/safari-610.1.17-branch/Source/WebCore/Sources.txt (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/Sources.txt 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/Sources.txt 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1134,10 +1134,10 @@
html/DateInputType.cpp
html/DateTimeInputType.cpp
html/DateTimeLocalInputType.cpp
-html/DirectoryFileListCreator.cpp
html/EmailInputType.cpp
html/EnterKeyHint.cpp
html/FTPDirectoryDocument.cpp
+html/FileListCreator.cpp
html/FeaturePolicy.cpp
html/FileInputType.cpp
html/FormAssociatedElement.cpp
Modified: branches/safari-610.1.17-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-06-18 22:53:36 UTC (rev 263238)
@@ -2431,7 +2431,7 @@
8358CB701C53277500E0C2D8 /* JSXMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F570AD1C53268E007FD6CB /* JSXMLDocument.h */; };
835D2D781F5F1FBD00141DED /* HTMLInputElementEntriesAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D2D751F5F1FB800141DED /* HTMLInputElementEntriesAPI.h */; };
835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D363619FF6193004C93AB /* StyleBuilderCustom.h */; };
- 835D54C51F4DE53800E60671 /* DirectoryFileListCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D54C21F4DE53400E60671 /* DirectoryFileListCreator.h */; };
+ 835D54C51F4DE53800E60671 /* FileListCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D54C21F4DE53400E60671 /* FileListCreator.h */; };
8362E8C120CEF9CB00245886 /* ShouldTreatAsContinuingLoad.h in Headers */ = {isa = PBXBuildFile; fileRef = 8362E8BF20CEF9CB00245886 /* ShouldTreatAsContinuingLoad.h */; settings = {ATTRIBUTES = (Private, ); }; };
836589DE1F54A76900DC31F4 /* JSFileSystemDirectoryReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 836589D91F54A76200DC31F4 /* JSFileSystemDirectoryReader.h */; };
836589E01F54A76E00DC31F4 /* JSFileSystemEntriesCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 836589D81F54A76200DC31F4 /* JSFileSystemEntriesCallback.h */; };
@@ -10358,8 +10358,8 @@
835D2D751F5F1FB800141DED /* HTMLInputElementEntriesAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLInputElementEntriesAPI.h; sourceTree = "<group>"; };
835D2D761F5F1FB800141DED /* HTMLInputElementEntriesAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLInputElementEntriesAPI.cpp; sourceTree = "<group>"; };
835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = "<group>"; };
- 835D54C11F4DE53400E60671 /* DirectoryFileListCreator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryFileListCreator.cpp; sourceTree = "<group>"; };
- 835D54C21F4DE53400E60671 /* DirectoryFileListCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryFileListCreator.h; sourceTree = "<group>"; };
+ 835D54C11F4DE53400E60671 /* FileListCreator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileListCreator.cpp; sourceTree = "<group>"; };
+ 835D54C21F4DE53400E60671 /* FileListCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileListCreator.h; sourceTree = "<group>"; };
835F8B261D2D90BA00E408EC /* Slotable.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Slotable.idl; sourceTree = "<group>"; };
8362E8BF20CEF9CB00245886 /* ShouldTreatAsContinuingLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShouldTreatAsContinuingLoad.h; sourceTree = "<group>"; };
836589D81F54A76200DC31F4 /* JSFileSystemEntriesCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileSystemEntriesCallback.h; sourceTree = "<group>"; };
@@ -22257,8 +22257,6 @@
F55B3D841251F12D003EF269 /* DateTimeInputType.h */,
F55B3D851251F12D003EF269 /* DateTimeLocalInputType.cpp */,
F55B3D861251F12D003EF269 /* DateTimeLocalInputType.h */,
- 835D54C11F4DE53400E60671 /* DirectoryFileListCreator.cpp */,
- 835D54C21F4DE53400E60671 /* DirectoryFileListCreator.h */,
2ED609BA1145B07100C8684E /* DOMFormData.cpp */,
2ED609BB1145B07100C8684E /* DOMFormData.h */,
2E0888C3114883A900AF4265 /* DOMFormData.idl */,
@@ -22276,6 +22274,8 @@
41A0829922932EF4008426E0 /* FeaturePolicy.h */,
F55B3D891251F12D003EF269 /* FileInputType.cpp */,
F55B3D8A1251F12D003EF269 /* FileInputType.h */,
+ 835D54C11F4DE53400E60671 /* FileListCreator.cpp */,
+ 835D54C21F4DE53400E60671 /* FileListCreator.h */,
4A0DA2FC129B241900AB61E1 /* FormAssociatedElement.cpp */,
4A0DA2FD129B241900AB61E1 /* FormAssociatedElement.h */,
F50664F5157F52DC00AC226F /* FormController.cpp */,
@@ -29992,7 +29992,6 @@
EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */,
7CAC6AE9247F082F00E61D59 /* ColorMatrix.h in Headers */,
9382DF5810A8D5C900925652 /* ColorSpace.h in Headers */,
- 7C029C6E2493C8F800268204 /* ColorTypes.h in Headers */,
0FEAF66B23BFC39E004030DA /* ColorUtilities.h in Headers */,
BCDD454E1236C95C009A7985 /* ColumnInfo.h in Headers */,
43EDD67F1B485DBF00640E75 /* CombinedFiltersAlphabet.h in Headers */,
@@ -30357,7 +30356,6 @@
937FF3D51A1012D6008EBA31 /* DictionaryLookup.h in Headers */,
2D5646B01B8F8493003C4994 /* DictionaryPopupInfo.h in Headers */,
FDAF19991513D131008DB0C3 /* DirectConvolver.h in Headers */,
- 835D54C51F4DE53800E60671 /* DirectoryFileListCreator.h in Headers */,
F47A09D120A93A9700240FAE /* DisabledAdaptations.h in Headers */,
7EDAAFC919A2CCDC0034DFD1 /* DiskCacheMonitorCocoa.h in Headers */,
1199FA5B208E3C7F002358CC /* DisplayBox.h in Headers */,
@@ -30590,6 +30588,7 @@
1A88A90517553CD7000C74F9 /* FileIconLoader.h in Headers */,
F55B3DBE1251F12D003EF269 /* FileInputType.h in Headers */,
976D6C86122B8A3D001FD1F7 /* FileList.h in Headers */,
+ 835D54C51F4DE53800E60671 /* FileListCreator.h in Headers */,
7A09CEF11F02069B00E93BDB /* FileMonitor.h in Headers */,
976D6C89122B8A3D001FD1F7 /* FileReader.h in Headers */,
2E75841E12779ADA0062628B /* FileReaderLoader.h in Headers */,
@@ -33111,6 +33110,7 @@
FE36FD1816C7826500F887C1 /* SQLTransactionState.h in Headers */,
FE36FD1716C7826500F887C1 /* SQLTransactionStateMachine.h in Headers */,
1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */,
+ 7C029C6E2493C8F800268204 /* ColorTypes.h in Headers */,
93F1996308245E59001E9ABC /* SSLKeyGenerator.h in Headers */,
26B999911803B3C900D01121 /* StackAllocator.h in Headers */,
BC7FA62D0D1F0EFF00DB22A9 /* StaticNodeList.h in Headers */,
Modified: branches/safari-610.1.17-branch/Source/WebCore/dom/Document.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/dom/Document.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/dom/Document.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -8589,7 +8589,7 @@
{
// Some canvas contexts need to do work when rendering has finished but
// before their content is composited.
- for (auto* canvas : copyToVector(m_canvasesNeedingDisplayPreparation)) {
+ for (auto* canvas : m_canvasesNeedingDisplayPreparation) {
// However, if they are not in the document body, then they won't
// be composited and thus don't need preparation. Unfortunately they
// can't tell at the time they were added to the list, since they
@@ -8603,11 +8603,6 @@
m_canvasesNeedingDisplayPreparation.clear();
}
-void Document::clearCanvasPreparation(HTMLCanvasElement* canvas)
-{
- m_canvasesNeedingDisplayPreparation.remove(canvas);
-}
-
void Document::canvasChanged(CanvasBase& canvasBase, const FloatRect&)
{
if (is<HTMLCanvasElement>(canvasBase)) {
Modified: branches/safari-610.1.17-branch/Source/WebCore/dom/Document.h (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/dom/Document.h 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/dom/Document.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1596,7 +1596,6 @@
const FrameSelection& selection() const { return m_selection; }
void prepareCanvasesForDisplayIfNeeded();
- void clearCanvasPreparation(HTMLCanvasElement*);
void canvasChanged(CanvasBase&, const FloatRect&) final;
void canvasResized(CanvasBase&) final { };
void canvasDestroyed(CanvasBase&) final;
Deleted: branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2017-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. 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 "DirectoryFileListCreator.h"
-
-#include "FileChooser.h"
-#include "FileList.h"
-#include <wtf/CrossThreadCopier.h>
-#include <wtf/FileMetadata.h>
-#include <wtf/FileSystem.h>
-
-namespace WebCore {
-
-DirectoryFileListCreator::~DirectoryFileListCreator()
-{
- ASSERT(!m_completionHandler);
-}
-
-static void appendDirectoryFiles(const String& directory, const String& relativePath, Vector<Ref<File>>& fileObjects)
-{
- for (auto& childPath : FileSystem::listDirectory(directory, "*")) {
- auto metadata = FileSystem::fileMetadata(childPath);
- if (!metadata)
- continue;
-
- if (metadata.value().isHidden)
- continue;
-
- String childRelativePath = relativePath + "/" + FileSystem::pathGetFileName(childPath);
- if (metadata.value().type == FileMetadata::Type::Directory)
- appendDirectoryFiles(childPath, childRelativePath, fileObjects);
- else if (metadata.value().type == FileMetadata::Type::File)
- fileObjects.append(File::createWithRelativePath(childPath, childRelativePath));
- }
-}
-
-static Ref<FileList> createFileList(const Vector<FileChooserFileInfo>& paths)
-{
- Vector<Ref<File>> fileObjects;
- for (auto& info : paths) {
- if (FileSystem::fileIsDirectory(info.path, FileSystem::ShouldFollowSymbolicLinks::No))
- appendDirectoryFiles(info.path, FileSystem::pathGetFileName(info.path), fileObjects);
- else
- fileObjects.append(File::create(info.path, info.displayName));
- }
- return FileList::create(WTFMove(fileObjects));
-}
-
-DirectoryFileListCreator::DirectoryFileListCreator(CompletionHandler&& completionHandler)
- : m_workQueue(WorkQueue::create("DirectoryFileListCreator Work Queue"))
- , m_completionHandler(WTFMove(completionHandler))
-{
-}
-
-void DirectoryFileListCreator::start(const Vector<FileChooserFileInfo>& paths)
-{
- // Resolve directories on a background thread to avoid blocking the main thread.
- m_workQueue->dispatch([this, protectedThis = makeRef(*this), paths = crossThreadCopy(paths)]() mutable {
- callOnMainThread([this, protectedThis = WTFMove(protectedThis), fileList = createFileList(paths)]() mutable {
- if (auto completionHandler = std::exchange(m_completionHandler, nullptr))
- completionHandler(WTFMove(fileList));
- });
- });
-}
-
-void DirectoryFileListCreator::cancel()
-{
- m_completionHandler = nullptr;
- m_workQueue = nullptr;
-}
-
-} // namespace WebCore
Deleted: branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.h (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.h 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2017-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. 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 <wtf/Forward.h>
-#include <wtf/Function.h>
-#include <wtf/Ref.h>
-#include <wtf/ThreadSafeRefCounted.h>
-#include <wtf/WorkQueue.h>
-
-namespace WebCore {
-
-struct FileChooserFileInfo;
-class FileList;
-
-class DirectoryFileListCreator : public ThreadSafeRefCounted<DirectoryFileListCreator> {
-public:
- using CompletionHandler = Function<void(Ref<FileList>&&)>;
-
- static Ref<DirectoryFileListCreator> create(CompletionHandler&& completionHandler)
- {
- return adoptRef(*new DirectoryFileListCreator(WTFMove(completionHandler)));
- }
-
- ~DirectoryFileListCreator();
-
- void start(const Vector<FileChooserFileInfo>&);
- void cancel();
-
-private:
- explicit DirectoryFileListCreator(CompletionHandler&&);
-
- RefPtr<WorkQueue> m_workQueue;
- CompletionHandler m_completionHandler;
-};
-
-}
Modified: branches/safari-610.1.17-branch/Source/WebCore/html/FileInputType.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/FileInputType.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/FileInputType.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -24,12 +24,12 @@
#include "Chrome.h"
#include "DOMFormData.h"
-#include "DirectoryFileListCreator.h"
#include "DragData.h"
#include "ElementChildIterator.h"
#include "Event.h"
#include "File.h"
#include "FileList.h"
+#include "FileListCreator.h"
#include "FormController.h"
#include "Frame.h"
#include "HTMLInputElement.h"
@@ -409,38 +409,21 @@
if (!displayString.isEmpty())
m_displayString = displayString;
- if (m_directoryFileListCreator)
- m_directoryFileListCreator->cancel();
+ if (m_fileListCreator)
+ m_fileListCreator->cancel();
- if (!allowsDirectories()) {
- auto files = paths.map([](auto& fileInfo) {
- return File::create(fileInfo.path, fileInfo.displayName);
- });
- didCreateFileList(FileList::create(WTFMove(files)), icon);
- return;
- }
-
- m_directoryFileListCreator = DirectoryFileListCreator::create([this, weakThis = makeWeakPtr(*this), icon = makeRefPtr(icon)](Ref<FileList>&& fileList) mutable {
- ASSERT(isMainThread());
- if (!weakThis)
+ auto shouldResolveDirectories = allowsDirectories() ? FileListCreator::ShouldResolveDirectories::Yes : FileListCreator::ShouldResolveDirectories::No;
+ m_fileListCreator = FileListCreator::create(paths, shouldResolveDirectories, [this, weakThis = makeWeakPtr(*this), icon = makeRefPtr(icon)](Ref<FileList>&& fileList) mutable {
+ auto protectedThis = makeRefPtr(weakThis.get());
+ if (!protectedThis)
return;
- didCreateFileList(WTFMove(fileList), WTFMove(icon));
+ setFiles(WTFMove(fileList), icon ? RequestIcon::Yes : RequestIcon::No);
+ if (icon && !m_fileList->isEmpty() && element())
+ iconLoaded(WTFMove(icon));
+ m_fileListCreator = nullptr;
});
- m_directoryFileListCreator->start(paths);
}
-void FileInputType::didCreateFileList(Ref<FileList>&& fileList, RefPtr<Icon>&& icon)
-{
- auto protectedThis = makeRef(*this);
-
- ASSERT(!allowsDirectories() || m_directoryFileListCreator);
- m_directoryFileListCreator = nullptr;
-
- setFiles(WTFMove(fileList), icon ? RequestIcon::Yes : RequestIcon::No);
- if (icon && !m_fileList->isEmpty() && element())
- iconLoaded(WTFMove(icon));
-}
-
String FileInputType::displayString() const
{
return m_displayString;
Modified: branches/safari-610.1.17-branch/Source/WebCore/html/FileInputType.h (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/FileInputType.h 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/FileInputType.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -39,9 +39,9 @@
namespace WebCore {
-class DirectoryFileListCreator;
class DragData;
class FileList;
+class FileListCreator;
class Icon;
class FileInputType final : public BaseClickableWithKeyInputType, private FileChooserClient, private FileIconLoaderClient, public CanMakeWeakPtr<FileInputType> {
@@ -86,10 +86,10 @@
// FileIconLoaderClient implementation.
void iconLoaded(RefPtr<Icon>&&) final;
- void applyFileChooserSettings(const FileChooserSettings&);
- void didCreateFileList(Ref<FileList>&&, RefPtr<Icon>&&);
void requestIcon(const Vector<String>&);
+ void applyFileChooserSettings(const FileChooserSettings&);
+
bool allowsDirectories() const;
RefPtr<FileChooser> m_fileChooser;
@@ -96,7 +96,7 @@
std::unique_ptr<FileIconLoader> m_fileIconLoader;
Ref<FileList> m_fileList;
- RefPtr<DirectoryFileListCreator> m_directoryFileListCreator;
+ RefPtr<FileListCreator> m_fileListCreator;
RefPtr<Icon> m_icon;
String m_displayString;
};
Copied: branches/safari-610.1.17-branch/Source/WebCore/html/FileListCreator.cpp (from rev 263214, branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.cpp) (0 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/FileListCreator.cpp (rev 0)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/FileListCreator.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2017-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. 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 "FileListCreator.h"
+
+#include "FileChooser.h"
+#include "FileList.h"
+#include <wtf/CrossThreadCopier.h>
+#include <wtf/FileMetadata.h>
+#include <wtf/FileSystem.h>
+
+namespace WebCore {
+
+FileListCreator::~FileListCreator()
+{
+ ASSERT(!m_completionHandler);
+}
+
+static void appendDirectoryFiles(const String& directory, const String& relativePath, Vector<Ref<File>>& fileObjects)
+{
+ for (auto& childPath : FileSystem::listDirectory(directory, "*")) {
+ auto metadata = FileSystem::fileMetadata(childPath);
+ if (!metadata)
+ continue;
+
+ if (metadata.value().isHidden)
+ continue;
+
+ String childRelativePath = relativePath + "/" + FileSystem::pathGetFileName(childPath);
+ if (metadata.value().type == FileMetadata::Type::Directory)
+ appendDirectoryFiles(childPath, childRelativePath, fileObjects);
+ else if (metadata.value().type == FileMetadata::Type::File)
+ fileObjects.append(File::createWithRelativePath(childPath, childRelativePath));
+ }
+}
+
+template<FileListCreator::ShouldResolveDirectories shouldResolveDirectories>
+static Ref<FileList> createFileList(const Vector<FileChooserFileInfo>& paths)
+{
+ Vector<Ref<File>> fileObjects;
+ for (auto& info : paths) {
+ if (shouldResolveDirectories == FileListCreator::ShouldResolveDirectories::Yes && FileSystem::fileIsDirectory(info.path, FileSystem::ShouldFollowSymbolicLinks::No))
+ appendDirectoryFiles(info.path, FileSystem::pathGetFileName(info.path), fileObjects);
+ else
+ fileObjects.append(File::create(info.path, info.displayName));
+ }
+ return FileList::create(WTFMove(fileObjects));
+}
+
+RefPtr<FileListCreator> FileListCreator::create(const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories shouldResolveDirectories, CompletionHandler&& completionHandler)
+{
+ if (shouldResolveDirectories == ShouldResolveDirectories::No) {
+ completionHandler(createFileList<ShouldResolveDirectories::No>(paths));
+ return nullptr;
+ }
+
+ return adoptRef(*new FileListCreator(paths, WTFMove(completionHandler)));
+}
+
+FileListCreator::FileListCreator(const Vector<FileChooserFileInfo>& paths, CompletionHandler&& completionHandler)
+ : m_workQueue(WorkQueue::create("FileListCreator Work Queue"))
+ , m_completionHandler(WTFMove(completionHandler))
+{
+ // Resolve directories on a background thread to avoid blocking the main thread.
+ m_workQueue->dispatch([this, protectedThis = makeRef(*this), paths = crossThreadCopy(paths)]() mutable {
+ auto fileList = createFileList<ShouldResolveDirectories::Yes>(paths);
+ callOnMainThread([this, protectedThis = WTFMove(protectedThis), fileList = WTFMove(fileList)]() mutable {
+ if (auto completionHandler = WTFMove(m_completionHandler))
+ completionHandler(WTFMove(fileList));
+ });
+ });
+}
+
+void FileListCreator::cancel()
+{
+ m_completionHandler = nullptr;
+ m_workQueue = nullptr;
+}
+
+} // namespace WebCore
Copied: branches/safari-610.1.17-branch/Source/WebCore/html/FileListCreator.h (from rev 263214, branches/safari-610.1.17-branch/Source/WebCore/html/DirectoryFileListCreator.h) (0 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/FileListCreator.h (rev 0)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/FileListCreator.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2017-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. 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 <wtf/Forward.h>
+#include <wtf/Function.h>
+#include <wtf/Ref.h>
+#include <wtf/ThreadSafeRefCounted.h>
+#include <wtf/WorkQueue.h>
+
+namespace WebCore {
+
+struct FileChooserFileInfo;
+class FileList;
+
+class FileListCreator : public ThreadSafeRefCounted<FileListCreator> {
+public:
+ using CompletionHandler = Function<void(Ref<FileList>&&)>;
+
+ enum class ShouldResolveDirectories { No, Yes };
+ static RefPtr<FileListCreator> create(const Vector<FileChooserFileInfo>&, ShouldResolveDirectories, CompletionHandler&&);
+
+ ~FileListCreator();
+
+ void cancel();
+
+private:
+ FileListCreator(const Vector<FileChooserFileInfo>&, CompletionHandler&&);
+
+ RefPtr<WorkQueue> m_workQueue;
+ CompletionHandler m_completionHandler;
+};
+
+}
Modified: branches/safari-610.1.17-branch/Source/WebCore/html/HTMLCanvasElement.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/html/HTMLCanvasElement.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/html/HTMLCanvasElement.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -146,8 +146,8 @@
// FIXME: This has to be called here because CSSCanvasValue::CanvasObserverProxy::canvasDestroyed()
// downcasts the CanvasBase object to HTMLCanvasElement. That invokes virtual methods, which should be
// avoided in destructors, but works as long as it's done before HTMLCanvasElement destructs completely.
+ // This will also cause the document to remove itself as an observer.
notifyObserversCanvasDestroyed();
- document().clearCanvasPreparation(this);
m_context = nullptr; // Ensure this goes away before the ImageBuffer.
setImageBuffer(nullptr);
@@ -1001,7 +1001,6 @@
void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument, Document& newDocument)
{
- oldDocument.clearCanvasPreparation(this);
removeObserver(oldDocument);
addObserver(newDocument);
@@ -1010,10 +1009,8 @@
void HTMLCanvasElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
{
- if (removalType.disconnectedFromDocument) {
- oldParentOfRemovedTree.document().clearCanvasPreparation(this);
+ if (removalType.disconnectedFromDocument)
removeObserver(oldParentOfRemovedTree.document());
- }
HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
}
Modified: branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentation.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentation.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentation.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -832,7 +832,7 @@
return false;
}
-void InspectorInstrumentation::interceptRequestImpl(InstrumentingAgents& instrumentingAgents, ResourceLoader& loader, Function<void(const ResourceRequest&)>&& handler)
+void InspectorInstrumentation::interceptRequestImpl(InstrumentingAgents& instrumentingAgents, ResourceLoader& loader, CompletionHandler<void(const ResourceRequest&)>&& handler)
{
if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
networkAgent->interceptRequest(loader, WTFMove(handler));
Modified: branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentation.h (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentation.h 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentation.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -52,7 +52,6 @@
#include <_javascript_Core/ConsoleMessage.h>
#include <initializer_list>
#include <wtf/CompletionHandler.h>
-#include <wtf/Function.h>
#include <wtf/MemoryPressureHandler.h>
#include <wtf/RefPtr.h>
@@ -239,7 +238,7 @@
static bool willIntercept(const Frame*, const ResourceRequest&);
static bool shouldInterceptRequest(const Frame&, const ResourceRequest&);
static bool shouldInterceptResponse(const Frame&, const ResourceResponse&);
- static void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
+ static void interceptRequest(ResourceLoader&, CompletionHandler<void(const ResourceRequest&)>&&);
static void interceptResponse(const Frame&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
static void addMessageToConsole(Page&, std::unique_ptr<Inspector::ConsoleMessage>);
@@ -449,7 +448,7 @@
static bool willInterceptImpl(InstrumentingAgents&, const ResourceRequest&);
static bool shouldInterceptRequestImpl(InstrumentingAgents&, const ResourceRequest&);
static bool shouldInterceptResponseImpl(InstrumentingAgents&, const ResourceResponse&);
- static void interceptRequestImpl(InstrumentingAgents&, ResourceLoader&, Function<void(const ResourceRequest&)>&&);
+ static void interceptRequestImpl(InstrumentingAgents&, ResourceLoader&, CompletionHandler<void(const ResourceRequest&)>&&);
static void interceptResponseImpl(InstrumentingAgents&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
static void addMessageToConsoleImpl(InstrumentingAgents&, std::unique_ptr<Inspector::ConsoleMessage>);
@@ -1287,7 +1286,7 @@
return false;
}
-inline void InspectorInstrumentation::interceptRequest(ResourceLoader& loader, Function<void(const ResourceRequest&)>&& handler)
+inline void InspectorInstrumentation::interceptRequest(ResourceLoader& loader, CompletionHandler<void(const ResourceRequest&)>&& handler)
{
ASSERT(InspectorInstrumentation::shouldInterceptRequest(*loader.frame(), loader.request()));
if (auto* instrumentingAgents = instrumentingAgentsForFrame(loader.frame()))
Modified: branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -40,7 +40,7 @@
return InspectorInstrumentation::shouldInterceptResponse(frame, response);
}
-void InspectorInstrumentationWebKit::interceptRequestInternal(ResourceLoader& loader, Function<void(const ResourceRequest&)>&& handler)
+void InspectorInstrumentationWebKit::interceptRequestInternal(ResourceLoader& loader, CompletionHandler<void(const ResourceRequest&)>&& handler)
{
InspectorInstrumentation::interceptRequest(loader, WTFMove(handler));
}
Modified: branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentationWebKit.h (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentationWebKit.h 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/inspector/InspectorInstrumentationWebKit.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -27,7 +27,6 @@
#include "InspectorInstrumentationPublic.h"
#include <wtf/CompletionHandler.h>
-#include <wtf/Function.h>
namespace WebCore {
@@ -39,13 +38,13 @@
public:
static bool shouldInterceptRequest(const Frame*, const ResourceRequest&);
static bool shouldInterceptResponse(const Frame*, const ResourceResponse&);
- static void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
+ static void interceptRequest(ResourceLoader&, CompletionHandler<void(const ResourceRequest&)>&&);
static void interceptResponse(const Frame*, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
private:
static bool shouldInterceptRequestInternal(const Frame&, const ResourceRequest&);
static bool shouldInterceptResponseInternal(const Frame&, const ResourceResponse&);
- static void interceptRequestInternal(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
+ static void interceptRequestInternal(ResourceLoader&, CompletionHandler<void(const ResourceRequest&)>&&);
static void interceptResponseInternal(const Frame&, const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
};
@@ -67,7 +66,7 @@
return shouldInterceptResponseInternal(*frame, response);
}
-inline void InspectorInstrumentationWebKit::interceptRequest(ResourceLoader& loader, Function<void(const ResourceRequest&)>&& handler)
+inline void InspectorInstrumentationWebKit::interceptRequest(ResourceLoader& loader, CompletionHandler<void(const ResourceRequest&)>&& handler)
{
ASSERT(InspectorInstrumentationWebKit::shouldInterceptRequest(loader.frame(), loader.request()));
interceptRequestInternal(loader, WTFMove(handler));
Modified: branches/safari-610.1.17-branch/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp 2020-06-18 22:53:36 UTC (rev 263238)
@@ -1114,7 +1114,7 @@
return shouldIntercept(response.url(), NetworkStage::Response);
}
-void InspectorNetworkAgent::interceptRequest(ResourceLoader& loader, Function<void(const ResourceRequest&)>&& handler)
+void InspectorNetworkAgent::interceptRequest(ResourceLoader& loader, CompletionHandler<void(const ResourceRequest&)>&& handler)
{
ASSERT(m_enabled);
ASSERT(m_interceptionEnabled);
Modified: branches/safari-610.1.17-branch/Source/WebCore/inspector/agents/InspectorNetworkAgent.h (263237 => 263238)
--- branches/safari-610.1.17-branch/Source/WebCore/inspector/agents/InspectorNetworkAgent.h 2020-06-18 22:47:42 UTC (rev 263237)
+++ branches/safari-610.1.17-branch/Source/WebCore/inspector/agents/InspectorNetworkAgent.h 2020-06-18 22:53:36 UTC (rev 263238)
@@ -125,7 +125,7 @@
bool shouldInterceptRequest(const ResourceRequest&);
bool shouldInterceptResponse(const ResourceResponse&);
void interceptResponse(const ResourceResponse&, unsigned long identifier, CompletionHandler<void(const ResourceResponse&, RefPtr<SharedBuffer>)>&&);
- void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
+ void interceptRequest(ResourceLoader&, CompletionHandler<void(const ResourceRequest&)>&&);
void searchOtherRequests(const JSC::Yarr::RegularExpression&, RefPtr<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>&);
void searchInRequest(ErrorString&, const String& requestId, const String& query, bool caseSensitive, bool isRegex, RefPtr<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>&);
@@ -164,25 +164,25 @@
WTF_MAKE_NONCOPYABLE(PendingInterceptRequest);
WTF_MAKE_FAST_ALLOCATED;
public:
- PendingInterceptRequest(RefPtr<ResourceLoader> loader, Function<void(const ResourceRequest&)>&& callback)
+ PendingInterceptRequest(RefPtr<ResourceLoader> loader, CompletionHandler<void(const ResourceRequest&)>&& completionHandler)
: m_loader(loader)
- , m_completionCallback(WTFMove(callback))
+ , m_completionHandler(WTFMove(completionHandler))
{ }
void continueWithOriginalRequest()
{
if (!m_loader->reachedTerminalState())
- m_completionCallback(m_loader->request());
+ m_completionHandler(m_loader->request());
}
void continueWithRequest(const ResourceRequest& request)
{
- m_completionCallback(request);
+ m_completionHandler(request);
}
PendingInterceptRequest() = default;
RefPtr<ResourceLoader> m_loader;
- Function<void(const ResourceRequest&)> m_completionCallback;
+ CompletionHandler<void(const ResourceRequest&)> m_completionHandler;
};
class PendingInterceptResponse {