Use enum class in createMarkup arguments
https://bugs.webkit.org/show_bug.cgi?id=190028
Reviewed by Wenson Hsieh.
Source/WebCore:
Replaced enums used by createMarkup with equivalent enum classes: EChildrenOnly with SerializedNodes,
EAbsoluteURLs with ResolveURLs, and EFragmentSerialization with SerializationSyntax.
Also replaced the boolean convertBlocksToInlines with an enum class of the same name.
Finally, renamed the createMarkup variant which doesn't serialize style and used for innerHTML and XMLSerializer
to serializeFragment.
(WebCore::Element::innerHTML const):
(WebCore::Element::outerHTML const):
(WebCore::ShadowRoot::innerHTML const):
- editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs):
- editing/HTMLInterchange.h:
(WebCore::AnnotateForInterchange): Renamed from EAnnotateForInterchange.
- editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::serializeNodes):
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
(WebCore::MarkupAccumulator::resolveURLIfNeeded const):
- editing/MarkupAccumulator.h:
(WebCore::MarkupAccumulator::inXMLFragmentSerialization const):
- editing/ReplaceRangeWithTextCommand.cpp:
(WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
- editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::willApplyCommand):
- editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
- editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::selectionInHTMLFormat):
- editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::WebContentMarkupReader::readRTFD):
(WebCore::WebContentMarkupReader::readRTF):
- editing/gtk/EditorGtk.cpp:
(WebCore::Editor::writeImageToPasteboard):
(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
(WebCore::StyledMarkupAccumulator::serializeNodes):
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
(WebCore::highestAncestorToWrapMarkup):
(WebCore::createMarkupInternal):
(WebCore::createMarkup):
(WebCore::sanitizedMarkupForFragmentInDocument):
(WebCore::serializeFragment): Renamed from createMarkup. This is used for innerHTML and XMLSerializer,
which faithfully serializes the fragment without any computed style as inline styles.
(WebCore::documentTypeString):
(WebCore::createFullMarkup): Deleted two varinats used in WebKitLegacy.
(WebCore::ResolveURLs): Renamed from EAbsoluteURLs.
(WebCore::ConvertBlocksToInlines): Added.
(WebCore::SerializedNodes): Renamed from EChildrenOnly.
(WebCore::SerializationSyntax): Renamed from EFragmentSerialization.
- editing/wpe/EditorWPE.cpp:
(WebCore::Editor::writeSelectionToPasteboard):
- inspector/DOMEditor.cpp:
- inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getOuterHTML):
- loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
(WebCore::PageSerializer::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
(WebCore::PageSerializer::serializeFrame):
- page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage):
- Source/WebCore/platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writeSelection):
(WebCore::XMLHttpRequest::send):
(WebCore::XMLSerializer::serializeToString):
- xml/XSLTProcessorLibxslt.cpp:
(WebCore::xsltStylesheetPointer):
(WebCore::xmlDocPtrFromNode):
Source/WebKit:
- WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::updateGlobalSelection):
Source/WebKitLegacy/mac:
(-[DOMNode markupString]): Moved the code from WebCore/editing/markup.cpp
(-[DOMRange markupString]): Ditto.
|