| Index: Source/core/editing/StyledMarkupAccumulator.cpp
|
| diff --git a/Source/core/editing/StyledMarkupAccumulator.cpp b/Source/core/editing/StyledMarkupAccumulator.cpp
|
| index 4bfd3d3df37a3dd4c3875091925d9de861ae01a8..46a6ba8538d1e691ea89eb9f0c6b5a9a809674d7 100644
|
| --- a/Source/core/editing/StyledMarkupAccumulator.cpp
|
| +++ b/Source/core/editing/StyledMarkupAccumulator.cpp
|
| @@ -61,11 +61,6 @@ StyledMarkupAccumulator::StyledMarkupAccumulator(EAbsoluteURLs shouldResolveURLs
|
| {
|
| }
|
|
|
| -void StyledMarkupAccumulator::appendStartTag(Node& node)
|
| -{
|
| - appendStartMarkup(node);
|
| -}
|
| -
|
| void StyledMarkupAccumulator::appendEndTag(const Element& element)
|
| {
|
| appendEndMarkup(m_result, element);
|
| @@ -73,26 +68,7 @@ void StyledMarkupAccumulator::appendEndTag(const Element& element)
|
|
|
| void StyledMarkupAccumulator::appendStartMarkup(Node& node)
|
| {
|
| - switch (node.nodeType()) {
|
| - case Node::TEXT_NODE: {
|
| - Text& text = toText(node);
|
| - if (text.parentElement() && text.parentElement()->tagQName() == textareaTag) {
|
| - appendText(text);
|
| - break;
|
| - }
|
| - appendTextWithInlineStyle(text);
|
| - break;
|
| - }
|
| - case Node::ELEMENT_NODE: {
|
| - Element& element = toElement(node);
|
| - RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element);
|
| - appendElement(element, style);
|
| - break;
|
| - }
|
| - default:
|
| - m_formatter.appendStartMarkup(m_result, node, nullptr);
|
| - break;
|
| - }
|
| + m_formatter.appendStartMarkup(m_result, node, nullptr);
|
| }
|
|
|
| void StyledMarkupAccumulator::appendEndMarkup(StringBuilder& result, const Element& element)
|
| @@ -161,27 +137,6 @@ void StyledMarkupAccumulator::appendElement(const Element& element, PassRefPtrWi
|
| appendElement(m_result, element);
|
| }
|
|
|
| -RefPtrWillBeRawPtr<EditingStyle> StyledMarkupAccumulator::createInlineStyle(Element& element)
|
| -{
|
| - RefPtrWillBeRawPtr<EditingStyle> inlineStyle = nullptr;
|
| -
|
| - if (shouldApplyWrappingStyle(element)) {
|
| - inlineStyle = m_wrappingStyle->copy();
|
| - inlineStyle->removePropertiesInElementDefaultStyle(&element);
|
| - inlineStyle->removeStyleConflictingWithStyleOfElement(&element);
|
| - } else {
|
| - inlineStyle = EditingStyle::create();
|
| - }
|
| -
|
| - if (element.isStyledElement() && element.inlineStyle())
|
| - inlineStyle->overrideWithStyle(element.inlineStyle());
|
| -
|
| - if (element.isHTMLElement() && shouldAnnotate())
|
| - inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element));
|
| -
|
| - return inlineStyle;
|
| -}
|
| -
|
| void StyledMarkupAccumulator::appendElementWithInlineStyle(StringBuilder& out, const Element& element, PassRefPtrWillBeRawPtr<EditingStyle> style)
|
| {
|
| const bool documentIsHTML = element.document().isHTMLDocument();
|
|
|