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

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

Issue 2341053002: Mark the createVisiblePosition overloads as deprecated (Closed)
Patch Set: minor revision Created 4 years, 3 months 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
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 template<typename Strategy> 168 template<typename Strategy>
169 String StyledMarkupSerializer<Strategy>::createMarkup() 169 String StyledMarkupSerializer<Strategy>::createMarkup()
170 { 170 {
171 StyledMarkupAccumulator markupAccumulator(m_shouldResolveURLs, toTextOffset( m_start.parentAnchoredEquivalent()), toTextOffset(m_end.parentAnchoredEquivalent ()), m_start.document(), m_shouldAnnotate, m_convertBlocksToInlines); 171 StyledMarkupAccumulator markupAccumulator(m_shouldResolveURLs, toTextOffset( m_start.parentAnchoredEquivalent()), toTextOffset(m_end.parentAnchoredEquivalent ()), m_start.document(), m_shouldAnnotate, m_convertBlocksToInlines);
172 172
173 Node* pastEnd = m_end.nodeAsRangePastLastNode(); 173 Node* pastEnd = m_end.nodeAsRangePastLastNode();
174 174
175 Node* firstNode = m_start.nodeAsRangeFirstNode(); 175 Node* firstNode = m_start.nodeAsRangeFirstNode();
176 const VisiblePositionTemplate<Strategy> visibleStart = createVisiblePosition (m_start); 176 const VisiblePositionTemplate<Strategy> visibleStart = createVisiblePosition Deprecated(m_start);
177 const VisiblePositionTemplate<Strategy> visibleEnd = createVisiblePosition(m _end); 177 const VisiblePositionTemplate<Strategy> visibleEnd = createVisiblePositionDe precated(m_end);
178 if (shouldAnnotate() && needInterchangeNewlineAfter(visibleStart)) { 178 if (shouldAnnotate() && needInterchangeNewlineAfter(visibleStart)) {
179 markupAccumulator.appendInterchangeNewline(); 179 markupAccumulator.appendInterchangeNewline();
180 if (visibleStart.deepEquivalent() == previousPositionOf(visibleEnd).deep Equivalent()) 180 if (visibleStart.deepEquivalent() == previousPositionOf(visibleEnd).deep Equivalent())
181 return markupAccumulator.takeResults(); 181 return markupAccumulator.takeResults();
182 182
183 firstNode = nextPositionOf(visibleStart).deepEquivalent().anchorNode(); 183 firstNode = nextPositionOf(visibleStart).deepEquivalent().anchorNode();
184 184
185 if (pastEnd && PositionTemplate<Strategy>::beforeNode(firstNode).compare To(PositionTemplate<Strategy>::beforeNode(pastEnd)) >= 0) { 185 if (pastEnd && PositionTemplate<Strategy>::beforeNode(firstNode).compare To(PositionTemplate<Strategy>::beforeNode(pastEnd)) >= 0) {
186 // This condition hits in editing/pasteboard/copy-display-none.html. 186 // This condition hits in editing/pasteboard/copy-display-none.html.
187 return markupAccumulator.takeResults(); 187 return markupAccumulator.takeResults();
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 if (element.isHTMLElement() && shouldAnnotate()) 486 if (element.isHTMLElement() && shouldAnnotate())
487 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element) ); 487 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element) );
488 488
489 return inlineStyle; 489 return inlineStyle;
490 } 490 }
491 491
492 template class StyledMarkupSerializer<EditingStrategy>; 492 template class StyledMarkupSerializer<EditingStrategy>;
493 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>; 493 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>;
494 494
495 } // namespace blink 495 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698