Refactor WebContentReader out of EditorMac and EditorIOS
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Sep 2017 07:17:43 +0000 (07:17 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Sep 2017 07:17:43 +0000 (07:17 +0000)
commit0f336d01b8086d38ad43ee8b69978d820d713f25
tree18ccb41e4c641f81434c6db3b30c2f6a71bc316f
parentc2ba48b07e19762601b245eaf1c2ad4c67336cfb
Refactor WebContentReader out of EditorMac and EditorIOS
https://bugs.webkit.org/show_bug.cgi?id=176770

Reviewed by Sam Weinig.

Source/WebCore:

Extracted WebContentReader.h, WebContentReaderMac.mm, and WebContentIOS.mm from Pasteboard.h,
EditorMac.mm, and EditorIOS.mm respectively.

Also moved createFragmentAndAddResources from EditorCocoa.mm to WebContentReaderCocoa.mm
and createFragmentForImageAndURL and createFragmentForImageResourceAndAddResource to markup.cpp.

* Configurations/WebCore.xcconfig:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.cpp:
(WebCore::Editor::createFragmentForImageAndURL): Deleted.
* editing/Editor.h:
* editing/WebContentReader.h: Added.
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::replaceSelectionWithAttributedString):
(WebCore::Editor::createFragment): Deleted.
(WebCore::Editor::createFragmentForImageResourceAndAddResource): Deleted.
(WebCore::Editor::createFragmentAndAddResources): Deleted.
* editing/cocoa/WebContentReaderCocoa.mm: Added.
(WebCore::createFragmentForImageResourceAndAddResource):
(WebCore::createFragment):
(WebCore::createFragmentAndAddResources):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::WebContentReader): Moved to WebContentReaderIOS.mm.
* editing/ios/WebContentReaderIOS.mm: Added.
(WebCore::WebContentReader::addFragment):
(WebCore::WebContentReader::readWebArchive):
(WebCore::WebContentReader::readFilenames):
(WebCore::WebContentReader::readHTML):
(WebCore::WebContentReader::readRTFD):
(WebCore::WebContentReader::readRTF):
(WebCore::WebContentReader::readImage):
(WebCore::WebContentReader::readURL):
(WebCore::WebContentReader::readPlainText):
* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader): Moved to WebContentReaderMac.mm.
* editing/mac/WebContentReaderMac.mm: Added.
(WebCore::WebContentReader::readWebArchive):
(WebCore::WebContentReader::readFilenames):
(WebCore::WebContentReader::readHTML):
(WebCore::WebContentReader::readRTFD):
(WebCore::WebContentReader::readRTF):
(WebCore::WebContentReader::readImage):
(WebCore::WebContentReader::readURL):
(WebCore::WebContentReader::readPlainText):
* editing/markup.cpp:
(WebCore::createFragmentForImageAndURL):
(WebCore::createFragmentForImageResourceAndAddResource):
* editing/markup.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebEditorClient.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/PlatformMac.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/WebContentReader.h [new file with mode: 0644]
Source/WebCore/editing/cocoa/EditorCocoa.mm
Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm [new file with mode: 0644]
Source/WebCore/editing/gtk/EditorGtk.cpp
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/ios/WebContentReaderIOS.mm [new file with mode: 0644]
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/editing/mac/WebContentReaderMac.mm [new file with mode: 0644]
Source/WebCore/editing/markup.cpp
Source/WebCore/editing/markup.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm