Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/Source/core/editing/serializers/StyledMarkupAccumulator.cpp

Issue 1522063002: Allow -webkit-text-decorations-in-effect preservation during para move. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/execCommand/justify-right-in-effect-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Igalia S.L. 4 * Copyright (C) 2011 Igalia S.L.
5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 start = m_start.offset(); 90 start = m_start.offset();
91 length -= start; 91 length -= start;
92 } 92 }
93 } 93 }
94 MarkupFormatter::appendCharactersReplacingEntities(m_result, str, start, len gth, m_formatter.entityMaskForText(text)); 94 MarkupFormatter::appendCharactersReplacingEntities(m_result, str, start, len gth, m_formatter.entityMaskForText(text));
95 } 95 }
96 96
97 void StyledMarkupAccumulator::appendTextWithInlineStyle(Text& text, PassRefPtrWi llBeRawPtr<EditingStyle> inlineStyle) 97 void StyledMarkupAccumulator::appendTextWithInlineStyle(Text& text, PassRefPtrWi llBeRawPtr<EditingStyle> inlineStyle)
98 { 98 {
99 if (inlineStyle) { 99 if (inlineStyle) {
100 // wrappingStyleForSerialization should have removed -webkit-text-decora tions-in-effect 100 // wrappingStyleForAnnotatedSerialization should have removed -webkit-te xt-decorations-in-effect
101 ASSERT(propertyMissingOrEqualToNone(inlineStyle->style(), CSSPropertyWeb kitTextDecorationsInEffect)); 101 ASSERT(!shouldAnnotate() || propertyMissingOrEqualToNone(inlineStyle->st yle(), CSSPropertyWebkitTextDecorationsInEffect));
102 ASSERT(m_document); 102 ASSERT(m_document);
103 103
104 m_result.appendLiteral("<span style=\""); 104 m_result.appendLiteral("<span style=\"");
105 MarkupFormatter::appendAttributeValue(m_result, inlineStyle->style()->as Text(), m_document->isHTMLDocument()); 105 MarkupFormatter::appendAttributeValue(m_result, inlineStyle->style()->as Text(), m_document->isHTMLDocument());
106 m_result.appendLiteral("\">"); 106 m_result.appendLiteral("\">");
107 } 107 }
108 if (!shouldAnnotate()) { 108 if (!shouldAnnotate()) {
109 appendText(text); 109 appendText(text);
110 } else { 110 } else {
111 const bool useRenderedText = !enclosingElementWithTag(firstPositionInNod e(&text), selectTag); 111 const bool useRenderedText = !enclosingElementWithTag(firstPositionInNod e(&text), selectTag);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 m_reversedPrecedingMarkup.append(str); 219 m_reversedPrecedingMarkup.append(str);
220 } 220 }
221 221
222 void StyledMarkupAccumulator::appendInterchangeNewline() 222 void StyledMarkupAccumulator::appendInterchangeNewline()
223 { 223 {
224 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\"" AppleInterchangeNewline "\">")); 224 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\"" AppleInterchangeNewline "\">"));
225 m_result.append(interchangeNewlineString); 225 m_result.append(interchangeNewlineString);
226 } 226 }
227 227
228 } // namespace blink 228 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/execCommand/justify-right-in-effect-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698