Chromium Code Reviews| Index: Source/core/editing/EditingStyle.cpp |
| diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp |
| index 52a3c39c96301892632d7f7bacee2d4b5bc6184c..5941fa1dcbe0de72bab4c8089fa6652c3f55166c 100644 |
| --- a/Source/core/editing/EditingStyle.cpp |
| +++ b/Source/core/editing/EditingStyle.cpp |
| @@ -1091,24 +1091,24 @@ void EditingStyle::mergeInlineAndImplicitStyleOfElement(Element* element, CSSPro |
| } |
| } |
| -PassRefPtrWillBeRawPtr<EditingStyle> EditingStyle::wrappingStyleForSerialization(ContainerNode* context, bool shouldAnnotate) |
| +PassRefPtrWillBeRawPtr<EditingStyle> EditingStyle::wrappingStyleForAnnotatedSerialization(ContainerNode* context) |
| { |
| - RefPtrWillBeRawPtr<EditingStyle> wrappingStyle = nullptr; |
| - if (shouldAnnotate) { |
| - wrappingStyle = EditingStyle::create(context, EditingStyle::EditingPropertiesInEffect); |
| + RefPtrWillBeRawPtr<EditingStyle> wrappingStyle = EditingStyle::create(context, EditingStyle::EditingPropertiesInEffect); |
| - // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, |
| - // to help us differentiate those styles from ones that the user has applied. |
| - // This helps us get the color of content pasted into blockquotes right. |
| - wrappingStyle->removeStyleAddedByElement(toHTMLElement(enclosingNodeOfType(firstPositionInOrBeforeNode(context), isMailHTMLBlockquoteElement, CanCrossEditingBoundary))); |
| + // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, |
|
yosin_UTC9
2015/06/24 05:52:17
Could you fill comment lines in 80 chars?
hajimehoshi
2015/06/24 06:03:16
Done.
|
| + // to help us differentiate those styles from ones that the user has applied. |
| + // This helps us get the color of content pasted into blockquotes right. |
| + wrappingStyle->removeStyleAddedByElement(toHTMLElement(enclosingNodeOfType(firstPositionInOrBeforeNode(context), isMailHTMLBlockquoteElement, CanCrossEditingBoundary))); |
| - // Call collapseTextDecorationProperties first or otherwise it'll copy the value over from in-effect to text-decorations. |
| - wrappingStyle->collapseTextDecorationProperties(); |
| + // Call collapseTextDecorationProperties first or otherwise it'll copy the value over from in-effect to text-decorations. |
| + wrappingStyle->collapseTextDecorationProperties(); |
| - return wrappingStyle.release(); |
| - } |
| + return wrappingStyle.release(); |
| +} |
| - wrappingStyle = EditingStyle::create(); |
| +PassRefPtrWillBeRawPtr<EditingStyle> EditingStyle::wrappingStyleForSerialization(ContainerNode* context) |
| +{ |
| + RefPtrWillBeRawPtr<EditingStyle> wrappingStyle = EditingStyle::create(); |
| // When not annotating for interchange, we only preserve inline style declarations. |
| for (ContainerNode* node = context; node && !node->isDocumentNode(); node = node->parentNode()) { |
| @@ -1121,7 +1121,6 @@ PassRefPtrWillBeRawPtr<EditingStyle> EditingStyle::wrappingStyleForSerialization |
| return wrappingStyle.release(); |
| } |
| - |
| static void mergeTextDecorationValues(CSSValueList* mergedValue, const CSSValueList* valueToMerge) |
| { |
| DEFINE_STATIC_REF_WILL_BE_PERSISTENT(CSSPrimitiveValue, underline, (CSSPrimitiveValue::createIdentifier(CSSValueUnderline))); |