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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Issue 1756763002: 2016-03-02T18:53:01 LayoutPosition Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-04-25T19:02:18 Created 4 years, 8 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) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 if (editingState->isAborted()) 281 if (editingState->isAborted())
282 return; 282 return;
283 if (!m_removeOnly) 283 if (!m_removeOnly)
284 addBlockStyle(styleChange, toHTMLElement(block)); 284 addBlockStyle(styleChange, toHTMLElement(block));
285 } 285 }
286 286
287 if (nextParagraphStart.isOrphan()) 287 if (nextParagraphStart.isOrphan())
288 nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStar t)); 288 nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStar t));
289 } 289 }
290 290
291 ASSERT(!nextParagraphStart.isOrphan());
291 paragraphStart = nextParagraphStart; 292 paragraphStart = nextParagraphStart;
292 nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart)); 293 nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart));
293 } 294 }
294 295
295 EphemeralRange startEphemeralRange = PlainTextRange(startIndex).createRangeF orSelection(toContainerNode(scope)); 296 EphemeralRange startEphemeralRange = PlainTextRange(startIndex).createRangeF orSelection(toContainerNode(scope));
296 if (startEphemeralRange.isNull()) 297 if (startEphemeralRange.isNull())
297 return; 298 return;
298 EphemeralRange endEphemeralRange = PlainTextRange(endIndex).createRangeForSe lection(toContainerNode(scope)); 299 EphemeralRange endEphemeralRange = PlainTextRange(endIndex).createRangeForSe lection(toContainerNode(scope));
299 if (endEphemeralRange.isNull()) 300 if (endEphemeralRange.isNull())
300 return; 301 return;
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 DEFINE_TRACE(ApplyStyleCommand) 1718 DEFINE_TRACE(ApplyStyleCommand)
1718 { 1719 {
1719 visitor->trace(m_style); 1720 visitor->trace(m_style);
1720 visitor->trace(m_start); 1721 visitor->trace(m_start);
1721 visitor->trace(m_end); 1722 visitor->trace(m_end);
1722 visitor->trace(m_styledInlineElement); 1723 visitor->trace(m_styledInlineElement);
1723 CompositeEditCommand::trace(visitor); 1724 CompositeEditCommand::trace(visitor);
1724 } 1725 }
1725 1726
1726 } // namespace blink 1727 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698