Chromium Code Reviews| Index: Source/core/editing/StyledMarkupAccumulator.cpp |
| diff --git a/Source/core/editing/StyledMarkupAccumulator.cpp b/Source/core/editing/StyledMarkupAccumulator.cpp |
| index 482c34195839f43be59776c2c0caa3ec906a77ea..53ad8a45e72e6760bf29d8589bc34c70a18f65fb 100644 |
| --- a/Source/core/editing/StyledMarkupAccumulator.cpp |
| +++ b/Source/core/editing/StyledMarkupAccumulator.cpp |
| @@ -67,7 +67,7 @@ void StyledMarkupAccumulator::appendStartMarkup(StringBuilder& result, Node& nod |
| break; |
| case Node::ELEMENT_NODE: { |
| Element& element = toElement(node); |
| - RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element, false); |
| + RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element); |
| appendElement(element, style); |
| break; |
| } |
| @@ -140,10 +140,8 @@ void StyledMarkupAccumulator::appendElement(Element& element, PassRefPtrWillBeRa |
| appendElement(m_result, element, false, style); |
| } |
| -RefPtrWillBeRawPtr<EditingStyle> StyledMarkupAccumulator::createInlineStyle(Element& element, bool addDisplayInline) |
| +RefPtrWillBeRawPtr<EditingStyle> StyledMarkupAccumulator::createInlineStyle(Element& element) |
| { |
| - const bool shouldAnnotateOrForceInline = element.isHTMLElement() && (shouldAnnotate() || addDisplayInline); |
| - |
| RefPtrWillBeRawPtr<EditingStyle> inlineStyle = nullptr; |
| if (shouldApplyWrappingStyle(element)) { |
| @@ -157,15 +155,12 @@ RefPtrWillBeRawPtr<EditingStyle> StyledMarkupAccumulator::createInlineStyle(Elem |
| if (element.isStyledElement() && element.inlineStyle()) |
| inlineStyle->overrideWithStyle(element.inlineStyle()); |
| - if (!shouldAnnotateOrForceInline) |
| + if (!element.isHTMLElement()) |
|
tkent
2015/06/11 06:55:11
nit:
if (element.isHTMLElement() && shouldAnnotat
hajimehoshi
2015/06/11 07:03:30
Done.
|
| return inlineStyle; |
| if (shouldAnnotate()) |
| inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)); |
| - if (addDisplayInline) |
| - inlineStyle->forceInline(); |
| - |
| return inlineStyle; |
| } |