Title: [212642] trunk/Source
Revision
212642
Author
a...@apple.com
Date
2017-02-20 09:22:56 -0800 (Mon, 20 Feb 2017)

Log Message

Clean up how WebKit exports _WebCreateFragment
https://bugs.webkit.org/show_bug.cgi?id=168579

Reviewed by Dan Bernstein.

Source/WebCore:

* editing/Editor.h: Removed the declaration of _WebCreateFragment, SOFT_LINK doesn't need it.
* editing/cocoa/EditorCocoa.mm: Moved a FIXME comment here.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Added WebCreateFragmentInternal.h.

Source/WebKit/mac:

* WebCoreSupport/WebCreateFragmentInternal.h: Added a private header.
* WebCoreSupport/WebEditorClient.mm: Include the new header that declares _WebCreateFragment.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (212641 => 212642)


--- trunk/Source/WebCore/ChangeLog	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebCore/ChangeLog	2017-02-20 17:22:56 UTC (rev 212642)
@@ -1,3 +1,13 @@
+2017-02-20  Alexey Proskuryakov  <a...@apple.com>
+
+        Clean up how WebKit exports _WebCreateFragment
+        https://bugs.webkit.org/show_bug.cgi?id=168579
+
+        Reviewed by Dan Bernstein.
+
+        * editing/Editor.h: Removed the declaration of _WebCreateFragment, SOFT_LINK doesn't need it.
+        * editing/cocoa/EditorCocoa.mm: Moved a FIXME comment here.
+
 2017-02-20  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r212637.

Modified: trunk/Source/WebCore/editing/Editor.h (212641 => 212642)


--- trunk/Source/WebCore/editing/Editor.h	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebCore/editing/Editor.h	2017-02-20 17:22:56 UTC (rev 212642)
@@ -589,9 +589,3 @@
 }
 
 } // namespace WebCore
-
-#if PLATFORM(COCOA)
-// This function is declared here but defined in the WebKitLegacy framework.
-// FIXME: Get rid of this and change this so it doesn't use WebKitLegacy.
-extern "C" void _WebCreateFragment(WebCore::Document&, NSAttributedString *, WebCore::FragmentAndResources&);
-#endif

Modified: trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm (212641 => 212642)


--- trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm	2017-02-20 17:22:56 UTC (rev 212642)
@@ -58,6 +58,7 @@
 SOFT_LINK_FRAMEWORK_IN_UMBRELLA(WebKit, WebKitLegacy)
 #endif
 
+// FIXME: Get rid of this and change NSAttributedString conversion so it doesn't use WebKitLegacy (cf. rdar://problem/30597352).
 SOFT_LINK(WebKitLegacy, _WebCreateFragment, void, (WebCore::Document& document, NSAttributedString *string, WebCore::FragmentAndResources& result), (document, string, result))
 
 namespace WebCore {

Modified: trunk/Source/WebKit/ChangeLog (212641 => 212642)


--- trunk/Source/WebKit/ChangeLog	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebKit/ChangeLog	2017-02-20 17:22:56 UTC (rev 212642)
@@ -1,3 +1,12 @@
+2017-02-20  Alexey Proskuryakov  <a...@apple.com>
+
+        Clean up how WebKit exports _WebCreateFragment
+        https://bugs.webkit.org/show_bug.cgi?id=168579
+
+        Reviewed by Dan Bernstein.
+
+        * WebKit.xcodeproj/project.pbxproj: Added WebCreateFragmentInternal.h.
+
 2017-02-15  Brady Eidson  <beid...@apple.com>
 
         Stop backing up localStorage databases to iCloud by default.

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (212641 => 212642)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2017-02-20 17:22:56 UTC (rev 212642)
@@ -791,6 +791,7 @@
 		DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */; };
 		DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; };
 		DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */; };
+		E13E782C1E5A7365001849D1 /* WebCreateFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = E13E782B1E5A7365001849D1 /* WebCreateFragmentInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E15663190FB61C1F00C199CA /* WebDownload.mm in Sources */ = {isa = PBXBuildFile; fileRef = E15663180FB61C1F00C199CA /* WebDownload.mm */; };
 		E169836211346D1B00894115 /* ProxyRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169836111346D1B00894115 /* ProxyRuntimeObject.h */; };
 		E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = E169836B11346D5600894115 /* ProxyRuntimeObject.mm */; };
@@ -1547,6 +1548,7 @@
 		DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTypesInternal.h; sourceTree = "<group>"; };
 		DD89681E09AA87240097E7F0 /* WebElementDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebElementDictionary.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebElementDictionary.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+		E13E782B1E5A7365001849D1 /* WebCreateFragmentInternal.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = WebCreateFragmentInternal.h; sourceTree = "<group>"; };
 		E15663180FB61C1F00C199CA /* WebDownload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDownload.mm; sourceTree = "<group>"; };
 		E169836111346D1B00894115 /* ProxyRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyRuntimeObject.h; sourceTree = "<group>"; };
 		E169836B11346D5600894115 /* ProxyRuntimeObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProxyRuntimeObject.mm; sourceTree = "<group>"; };
@@ -2579,6 +2581,7 @@
 				14D8252E0AF955090004F057 /* WebChromeClient.mm */,
 				065AD5A10B0C32C7005A2B1D /* WebContextMenuClient.h */,
 				065AD5A20B0C32C7005A2B1D /* WebContextMenuClient.mm */,
+				E13E782B1E5A7365001849D1 /* WebCreateFragmentInternal.h */,
 				598AD9191201CEC900ABAE4E /* WebDeviceOrientationClient.h */,
 				598AD91D1201CECF00ABAE4E /* WebDeviceOrientationClient.mm */,
 				A70936AD0B5608DC00CDB48E /* WebDragClient.h */,
@@ -2909,6 +2912,7 @@
 				93D437701D57ABEF00AB85EA /* DOMRGBColor.h in Headers */,
 				93D437721D57ABEF00AB85EA /* DOMRGBColorInternal.h in Headers */,
 				93D437731D57ABEF00AB85EA /* DOMStyleSheet.h in Headers */,
+				E13E782C1E5A7365001849D1 /* WebCreateFragmentInternal.h in Headers */,
 				93D437751D57ABEF00AB85EA /* DOMStyleSheetInternal.h in Headers */,
 				93D437761D57ABEF00AB85EA /* DOMStyleSheetList.h in Headers */,
 				93D437781D57ABEF00AB85EA /* DOMStyleSheetListInternal.h in Headers */,

Modified: trunk/Source/WebKit/mac/ChangeLog (212641 => 212642)


--- trunk/Source/WebKit/mac/ChangeLog	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-02-20 17:22:56 UTC (rev 212642)
@@ -1,3 +1,13 @@
+2017-02-20  Alexey Proskuryakov  <a...@apple.com>
+
+        Clean up how WebKit exports _WebCreateFragment
+        https://bugs.webkit.org/show_bug.cgi?id=168579
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebCreateFragmentInternal.h: Added a private header.
+        * WebCoreSupport/WebEditorClient.mm: Include the new header that declares _WebCreateFragment.
+
 2017-02-20  Aakash Jain  <aakash_j...@apple.com>
 
         Stop exporting DOMNodeFilter

Added: trunk/Source/WebKit/mac/WebCoreSupport/WebCreateFragmentInternal.h (0 => 212642)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebCreateFragmentInternal.h	                        (rev 0)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebCreateFragmentInternal.h	2017-02-20 17:22:56 UTC (rev 212642)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+class Document;
+struct FragmentAndResources;
+}
+
+extern "C" void _WebCreateFragment(WebCore::Document&, NSAttributedString *, WebCore::FragmentAndResources&);

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (212641 => 212642)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2017-02-20 17:20:04 UTC (rev 212641)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2017-02-20 17:22:56 UTC (rev 212642)
@@ -38,6 +38,7 @@
 #import "DOMNodeInternal.h"
 #import "DOMRangeInternal.h"
 #import "WebArchive.h"
+#import "WebCreateFragmentInternal.h"
 #import "WebDataSourceInternal.h"
 #import "WebDelegateImplementationCaching.h"
 #import "WebDocument.h"
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to